Hi,
I have a program that check the IP address and automatic update it to the DNS server. I would like to run this program when the computer bootup after pppd get a connection. How do I add it to the init file. Does any one have any information of how to do it.
I run a Linux Mandrake as a... (1 Reply)
Hi all,
I like to know how can I get currenlty running process start time and date , I know only porcess id in solaris and hp-ux
and
what is command to get same using ps with switch.
Thanks
Naeem (1 Reply)
what is command to get same using ps with switch.
I know process id, by specify process id.
It should work on solaris and hp-ux
I will be happy if for both different commands. (2 Replies)
Hi,
I have a shell script which i am running. I want it's starting time (the time when the execution of the shell script started) in another shell script. Note that the process has already terminated when i need it's starting time.... else i could have used ps -f | cut -d" " -f5...
But that's... (2 Replies)
When I get start program at boot
I read which run level
/sbin/rcx.d runlevel=0.....x
only read directory which directory name has UpperCase 'S'
is not enough
someone says that I need to reference another file
which file I need to reference
1)/etc/rc.config.d/all file which parameter... (4 Replies)
Process start time is not showing the correct time:
I had started a process on Jun 17th at 23:30:00.
Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41
Day/Date is setup correctly on the server.
It... (2 Replies)
Not sure if it makes a difference but "foo" is a java process. The start time reported by various flavors of ps seems to be flopping back and forth by a minute.
I have many (a few hundred) "foo" like processes which tend to be somewhat unstable and get restarted somewhat frequently, I wrote a... (2 Replies)
I am trying to see if a process is running what was its start time.
here is the code that I am using
if
then
echo 'Gateway output processing started.'
else
VAR=$(ps -ef | grep batch_output_x )
...
fi
now the problem i see is when the process is running i get two... (3 Replies)
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies
LEARN ABOUT DEBIAN
sys::statistics::linux::cpustats
Sys::Statistics::Linux::CpuStats(3pm) User Contributed Perl Documentation Sys::Statistics::Linux::CpuStats(3pm)NAME
Sys::Statistics::Linux::CpuStats - Collect linux cpu statistics.
SYNOPSIS
use Sys::Statistics::Linux::CpuStats;
my $lxs = Sys::Statistics::Linux::CpuStats->new;
$lxs->init;
sleep 1;
my $stats = $lxs->get;
Or
my $lxs = Sys::Statistics::Linux::CpuStats->new(initfile => $file);
$lxs->init;
my $stats = $lxs->get;
DESCRIPTION
Sys::Statistics::Linux::CpuStats gathers cpu statistics from the virtual /proc filesystem (procfs).
For more information read the documentation of the front-end module Sys::Statistics::Linux.
CPU STATISTICS
Generated by /proc/stat for each cpu (cpu0, cpu1 ...). cpu without a number is the summary.
user - Percentage of CPU utilization at the user level.
nice - Percentage of CPU utilization at the user level with nice priority.
system - Percentage of CPU utilization at the system level.
idle - Percentage of time the CPU is in idle state.
total - Total percentage of CPU utilization.
Statistics with kernels >= 2.6.
iowait - Percentage of time the CPU is in idle state because an I/O operation
is waiting to complete.
irq - Percentage of time the CPU is servicing interrupts.
softirq - Percentage of time the CPU is servicing softirqs.
steal - Percentage of stolen CPU time, which is the time spent in other
operating systems when running in a virtualized environment (>=2.6.11).
METHODS
new()
Call "new()" to create a new object.
my $lxs = Sys::Statistics::Linux::CpuStats->new;
Maybe you want to store/load the initial statistics to/from a file:
my $lxs = Sys::Statistics::Linux::CpuStats->new(initfile => '/tmp/cpustats.yml');
If you set "initfile" it's not necessary to call sleep before "get()".
It's also possible to set the path to the proc filesystem.
Sys::Statistics::Linux::CpuStats->new(
files => {
# This is the default
path => '/proc'
stat => 'stat',
}
);
init()
Call "init()" to initialize the statistics.
$lxs->init;
get()
Call "get()" to get the statistics. "get()" returns the statistics as a hash reference.
my $stats = $lxs->get;
raw()
Get raw values.
EXPORTS
No exports.
SEE ALSO proc(5)REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-09 Sys::Statistics::Linux::CpuStats(3pm)