Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: 'A' web server takes another "time out" (root)

by Hue-Bond (Priest)
on May 04, 2006 at 18:58 UTC ( #547492=note: print w/replies, xml ) Need Help??


in reply to Re^2: 'A' web server takes another "time out" (root)
in thread 'A' web server takes another "time out"

I don't have any access to /proc [...] 'man ps' mentions needing procfs mounted [...] I think just adding "ps" output to the existing "top" output would be one of the next steps.

If top took 5.5 minutes in showing output between two given snapshots above, I think adding ps won't improve the situation because ps data won't be correlated at all with top's. My bet would be to play with ps o argument, which allow you to get the information of top and more. Setting PERSONALITY to "bsd" on this Linux machine allows me to run ps as I were on a FreeBSD. I hope...

$ PERSONALITY=bsd ps faxo pid,euid,egid,ni:2,vsz:6,rss:6,pcpu,pmem,sta +t:3=ST,tname:6,stime,bsdtime,args PID EUID EGID NI VSZ RSS %CPU %MEM ST TTY STIME TIME C +OMMAND 1 0 0 0 1924 652 0.0 0.0 S ? 19:24 0:00 i +nit [2] 2 0 0 19 0 0 0.0 0.0 SN ? 19:24 0:00 [ +ksoftirqd/0] 3 0 0 -5 0 0 0.0 0.0 S< ? 19:24 0:00 [ +events/0] [...] 1368 111 111 0 26580 912 0.0 0.0 Ssl ? 19:26 0:00 / +usr/sbin/ippl -c /var/run/ippl/ippl.conf 1423 0 0 0 4800 1608 0.0 0.1 Ss ? 19:26 0:00 / +usr/lib/postfix/master 1428 101 104 0 4812 1604 0.0 0.1 S ? 19:26 0:00 +\_ pickup -l -t fifo -u -c

You can s/args$/comm/ in order not to show parameters of commands:

1368 111 111 0 26580 912 0.0 0.0 Ssl ? 19:26 0:00 i +ppl 1423 0 0 0 4800 1608 0.0 0.1 Ss ? 19:26 0:00 m +aster 1428 101 104 0 4812 1604 0.0 0.1 S ? 19:26 0:00 +\_ pickup

HTH.

--
David Serrano

Replies are listed 'Best First'.
Re^4: 'A' web server takes another "time out" (root)
by tye (Sage) on May 04, 2006 at 19:47 UTC

    Heh, but that doesn't show me the one thing I'm interested in, the parent PID. The 'top' and 'ps' output don't have to be in sync; I just need a snapshot of 'ps' output at some point during the "bad time" in order to see who owns the newest 'httpd' processes.

    FYI, your hoping wasn't enough (:

    ps: euid: keyword not found ps: egid: keyword not found ps: ni:2: keyword not found ps: vsz:6: keyword not found ps: rss:6: keyword not found ps: stat:3: keyword not found ps: tname:6: keyword not found ps: stime: keyword not found ps: bsdtime: keyword not found ps: args: keyword not found PID %CPU %MEM 0 0.0 0.0 1 0.0 0.0 2 0.0 0.0 ...

    - tye        

      ps -axo pid,ppid,command

          --k.


        Kanji,
        Some of the other information suggested is probably useful to tye. In most cases, the specification of width doesn't work as pointed out below. In a few others, the keywords were invalid for FreeBSD's ps. The interesting thing is that 'args' is listed as a valid key word in TFM but still complained even though no width was specified.

        Cheers - L~R

      ps: euid: keyword not found ps: egid: keyword not found ps: ni:2: keyword not found

      Great :^(. It seems that that ps doesn't support field width. The field for the PPID is surprinsingly ;^) called "ppid". After searching for the manpage on google, I'd try something like ps -j, ps -l and ps -a -x -o pid,ppid (this last one is just for testing if ppid works).

      --
      David Serrano

      Well, "ppid" is one of the values to be specified for option "-o", "ps(1)". Try something like (tested on one of the Pair shared hosts running FreeBSD 4.8-STABLE) ...
      ps -wwax -o ppid,pid,pgid,rss,vsz,nice,%mem,%cpu,rgid,ruser,user,stat, +command \ | sort -k1,1n -k2,2n
      ... there are other options listed related to paging & swapping, and (real & saved) user & group id. If you specify the "-c" option along with "-o command", only command name will show up (w/o the arguments).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://547492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2019-11-17 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (87 votes). Check out past polls.

    Notices?