bash reads on device when it shouldn't...

View: New views
3 Messages — Rating Filter:   Alert me  

bash reads on device when it shouldn't...

by Kārlis Repsons-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello there,

dear reader, in case there can be found some solution or I can add my
observation for future improvements, I try explaining one problem with bash.

I've set up a system, which has some disks, that are not always used, but are
always mounted. OS and program files are all in other place and the only
program, which still reads some blocks (echo 1 > /proc/sys/vm/block_dump),
that doesn't point to any specific files, is bash. It happens sometimes when
I log in or time after time as bash is running somewhere. And it spins up
those disks...

Please, if there is some good cure in mind, I am one, who would appreciate.

All best,
Kārlis


signature.asc (205 bytes) Download Attachment

Re: bash reads on device when it shouldn't...

by Greg Wooledge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 22, 2009 at 06:47:43PM +0000, K??rlis Repsons wrote:
> I've set up a system, which has some disks, that are not always used, but are
> always mounted. OS and program files are all in other place and the only
> program, which still reads some blocks (echo 1 > /proc/sys/vm/block_dump),
> that doesn't point to any specific files, is bash. It happens sometimes when
> I log in or time after time as bash is running somewhere. And it spins up
> those disks...

"When I log in" is probably bash reading your dot files (/etc/profile,
~/.bash_profile, ~/.bashrc) and whatever the commands in those files tell
it to do.

"Time after time as bash is running" is probably the mail check, unless
you've told bash to store history in some nonstandard way.  (This would
also be likely to occur at login.)

"man bash" will tell you how to disable the mail check, if you'd like to
try that.  If you'd like to find out what's actually happening, you might
need to use something like truss/strace/etc. with timestamps, and then
refer back to the trace when you observe the disk behavior, and see what
bash was doing at that time.



Parent Message unknown Re: bash reads on device when it shouldn't...

by Kārlis Repsons-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for looking!

On Friday 23 October 2009 16:11:06 Marc Herbert wrote:
> In case you are using Linux you can pinpoint which files are accessed
> like this:
>
> echo 1 > /proc/sys/vm/block_dump
> dmesg -c

If you was more careful, you'd know I already did that. And there was NO
SPECIFIC FILE mentioned in blockdump. "something" was read at some block and
that was all the info. In other times when some particular file was red, it
was right in blockdump... So I have no idea.


On Friday 23 October 2009 15:00:07 Greg Wooledge wrote:
> "When I log in" is probably bash reading your dot files (/etc/profile,
> ~/.bash_profile, ~/.bashrc) and whatever the commands in those files tell
> it to do.
But please, those all are not on disks, which are unnecessarily turned on!

> "Time after time as bash is running" is probably the mail check, unless
> you've told bash to store history in some nonstandard way.  (This would
> also be likely to occur at login.)
>
> "man bash" will tell you how to disable the mail check, if you'd like to
> try that.
I will try this a bit later... Anyway, no program data should be written or
read on those disks by that.

> If you'd like to find out what's actually happening, you might
> need to use something like truss/strace/etc. with timestamps, and then
> refer back to the trace when you observe the disk behavior, and see what
> bash was doing at that time.
Does that requires specific kernel options or bash in some debug compilation?