my $ppid = `/sbin/pidof pppd`; # cannot be 0 so logic works # $ppid is empty unless pppd is running. # Having the pid lets you signal the daemon
You can also poke around in /proc for all sorts of interesting system info. All you need to do is treat it as ordinary files and dirs.
After Compline,
Zaxo
Update: my $pstart=`/bin/ps -C pppd -o pid=,start_time=`; will return space delimited pid and start time. The time format shifts from date to time for young processes, so parsing is difficult.
In reply to Re: Getting Linux system info
by Zaxo
in thread Getting Linux system info
by readey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |