amyarjun has asked for the wisdom of the Perl Monks concerning the following question:

Good Day
I need some guide,
i have few perl application running as a daemon in Linux fedora.
I need to read out the status, currently i'm reading using ps -C <the file name>.
the system shows whether the daemon is running or not, but i need more info liek usage time , memory usage , sleep and ...
and i want to do it in a nice sorted manner so that i can view a list in a cool layout.

any one can give guide hint anything will be very help ful

Replies are listed 'Best First'.
Re: read daemon status
by tachyon (Chancellor) on Aug 15, 2004 at 11:56 UTC

    All the raw info is in:

    /proc/PID/*

    For example you may be interested in:

    cat /proc/PID/status cat /proc/PID/mem cat /proc/PID/cpu

    tachyon

Re: read daemon status
by edan (Curate) on Aug 15, 2004 at 12:01 UTC

    You should consult your friendly local man pages for ps. You'll find there are myriad options for controlling output and sorting. For example, you could use:

    ps -C daemon -o command,pcpu,%mem,user,time,rss --sort rss

    HTH

    --
    edan

Re: read daemon status
by borisz (Canon) on Aug 15, 2004 at 11:23 UTC
    Look at GTop to get information for your process.
    Boris
Re: read daemon status
by saintmike (Vicar) on Aug 15, 2004 at 19:32 UTC
Re: read daemon status
by Zaxo (Archbishop) on Aug 15, 2004 at 17:49 UTC

    On Red Hattish systems, the daemon init script often has a status target.

    $ /etc/rc.d/init.d/httpd status httpd (pid 11795 11789 11676 11675 11674 709) is running... $

    After Compline,
    Zaxo