[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Little script help
> Note that cmdline is empty, for some reason. If you 'ps ax', you'll find
that
> the processes in square brackets, will have an empty /proc/$$/cmdline. Why
> this is I don't know, and one I didn't know about until now. So I may dig
:)
Isn't this the case for non-root ps'es? I'm not stating gospel here, but I
seem to recall that cmdline is unavailable for users because basically you'd
be able to get information you shouldn't necessarily have (mm.. dunno..
someone running fetchmail, specifying password, etc?)
Would a simple grep "search-string" `find /proc/some-regex` type thing work?
I guess it depends what information you want, from where. Maybe you could
look at the ps script, and do a little #ifdef / #endif type thing? What I
mean is, in places where the ps script is obviously doing work (find, for
example), you could pass it a command-line option to cut that out, by
surrounding it with a conditional based on the command-line option. Because,
if ps is really taking that long, that probably means it's doing a lot of
work - speed it up by making it not do the work you don't need?
Cheers,
Alex.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.