10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I will initiate a process from Server1 and the flow is as follow
Server1 --> Web server --> Application server --> DB Server
Note all seperate unix servers.
Now I need to put a trace for that process to track the timings from each server.
Like the below trace should be there:
... (5 Replies)
Discussion started by: saraperu
5 Replies
2. UNIX for Advanced & Expert Users
Hi,
i want to track a process using its PID in SOLARIS.
i have a code in C++ , which memory is increasing steeply increasing every 20 days, from the code i couldn't see any memory leak.
is there any way in UNIX where with the help of PID i can trace the Process usage evry hour.
... (3 Replies)
Discussion started by: senkerth
3 Replies
3. Shell Programming and Scripting
Hello, I need to monitor IOwait on a server and have started this script directly on the ssh prompt.
Effectively it almost does what it is supposed to do, but I have no idea how to stop it?
How can I make it run it as a file based bash script?
(
iostat -xk 1 /dev/sdb2 | \
perl... (10 Replies)
Discussion started by: cuantica
10 Replies
4. Linux
Hi gurus,
Just wanted to know if there is any way to trace the PID of a process that has already completed it's job and exited.
My tomcat server was found in a hung state and we restarted it. Now we have found that someone has ran a kill -9 "pid" and wanted to know if it is the PID of tomcat.... (1 Reply)
Discussion started by: Hari_Ganesh
1 Replies
5. AIX
I don't know when the process will start and end, I need write a script to trace it's cpu/memory usage when it is runing. How to write this script? (2 Replies)
Discussion started by: rainbow_bean
2 Replies
6. UNIX for Advanced & Expert Users
Hello,
I execute an application on my Unix AIX Server and that one crashes after reading some files. These files are very big (80 Mbytes), the application is a CVS Repository.
I have found with a comparaison on a Solaris Server that there are system limitations on my AIX Server in the... (2 Replies)
Discussion started by: steiner
2 Replies
7. Solaris
Hi all,
We have a server having much processes running. It is very difficuilt to trace the exact consuming more memory. Howerver, it shows CPU usage in sequence but how memory?
Tried working with TOP command.
Please let me know if something not clear.
Thanks,
Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies
8. AIX
Hi,
Sometimes when I want to unmount some filesystem I get "The requested resource is busy." error.
In such a case I try to find and kill process that uses that filesystem. I do that on random.
Is there a right way to find whitch prosesses use filesystem resource at given time ?
thanks... (1 Reply)
Discussion started by: vilius
1 Replies
9. UNIX for Advanced & Expert Users
Hi All,
Any ideas how to reduce IOWAIT and increase disk speed on Linux server.
Server has 4 CPUs and with 8GB RAM.
Thanks in advance,
Regards,
Bache (3 Replies)
Discussion started by: bache_gowda
3 Replies
10. UNIX for Dummies Questions & Answers
i have a server constantly have high iowait, but i am not able to tell which process generate the most of io. none commands, such as iostat, sar, top will give me this kind of information.
hope there is some command can help me to spot the process generate the most of io
let to know input... (1 Reply)
Discussion started by: giantpanda77
1 Replies
Sys::Statistics::Linux::Compilation(3pm) User Contributed Perl Documentation Sys::Statistics::Linux::Compilation(3pm)
NAME
Sys::Statistics::Linux::Compilation - Statistics compilation.
SYNOPSIS
use Sys::Statistics::Linux;
my $lxs = Sys::Statistics::Linux->new( loadavg => 1 );
my $stat = $lxs->get;
foreach my $key ($stat->loadavg) {
print $key, " ", $stat->loadavg($key), "
";
}
# or
use Sys::Statistics::Linux::LoadAVG;
use Sys::Statistics::Linux::Compilation;
my $lxs = Sys::Statistics::Linux::LoadAVG->new();
my $load = $lxs->get;
my $stat = Sys::Statistics::Linux::Compilation->new({ loadavg => $load });
foreach my $key ($stat->loadavg) {
print $key, " ", $stat->loadavg($key), "
";
}
# or
foreach my $key ($stat->loadavg) {
print $key, " ", $stat->loadavg->{$key}, "
";
}
DESCRIPTION
This module provides different methods to access and filter the statistics compilation.
METHODS
new()
Create a new "Sys::Statistics::Linux::Compilation" object. This creator is only useful if you don't call "get()" of
"Sys::Statistics::Linux". You can create a new object with:
my $lxs = Sys::Statistics::Linux::LoadAVG->new();
my $load = $lxs->get;
my $stat = Sys::Statistics::Linux::Compilation->new({ loadavg => $load });
Statistic methods
sysinfo()
cpustats()
procstats()
memstats()
pgswstats()
netstats()
netinfo()
"netinfo()" provides raw data - no deltas.
sockstats()
diskstats()
diskusage()
loadavg()
filestats()
processes()
All methods returns the statistics as a hash reference in scalar context. In list all methods returns the first level keys of the
statistics. Example:
my $net = $stat->netstats; # netstats as a hash reference
my @dev = $stat->netstats; # the devices eth0, eth1, ...
my $eth0 = $stat->netstats('eth0'); # eth0 statistics as a hash reference
my @keys = $stat->netstats('eth0'); # the statistic keys
my @vals = $stat->netstats('eth0', @keys); # the values for the passed device and @keys
my $val = $stat->netstats('eth0', $key); # the value for the passed device and key
Sorted ...
my @dev = sort $stat->netstats;
my @keys = sort $stat->netstats('eth0');
pstop()
This method is looking for top processes and returns a sorted list of PIDs as an array or array reference depending on the context. It
expected two values: a key name and the number of top processes to return.
As example you want to get the top 5 processes with the highest cpu usage:
my @top5 = $stat->pstop( ttime => 5 );
# or as a reference
my $top5 = $stat->pstop( ttime => 5 );
If you want to get all processes:
my @top_all = $stat->pstop( ttime => $FALSE );
# or just
my @top_all = $stat->pstop( 'ttime' );
search(), psfind()
Both methods provides a simple scan engine to find special statistics. Both methods except a filter as a hash reference. It's possible to
pass the statistics as second argument if the data is not stored in the object.
The method "search()" scans for statistics and rebuilds the hash tree until that keys that matched your filter and returns the hits as a
hash reference.
my $hits = $stat->search({
processes => {
cmd => qr/[su]/,
owner => qr/root/
},
cpustats => {
idle => 'lt:10',
iowait => 'gt:10'
},
diskusage => {
'/dev/sda1' => {
usageper => 'gt:80'
}
}
});
This would return the following matches:
* processes with the command "[su]"
* processes with the owner "root"
* all cpu where "idle" is less than 50
* all cpu where "iowait" is grather than 10
* only disk '/dev/sda1' if "usageper" is grather than 80
The method "psfind()" scans for processes only and returns a array reference with all process IDs that matched the filter. Example:
my $pids = $stat->psfind({ cmd => qr/init/, owner => 'eq:apache' });
This would return the following process ids:
* processes that matched the command "init"
* processes with the owner "apache"
There are different match operators available:
gt - grather than
lt - less than
eq - is equal
ne - is not equal
Notation examples:
gt:50
lt:50
eq:50
ne:50
Both argumnents have to be set as a hash reference.
Note: the operators < > = ! are not available any more. It's possible that in further releases could be different changes for "search()"
and "psfind()". So please take a look to the documentation if you use it.
EXPORTS
No exports.
TODOS
* Are there any wishs from your side? Send me a mail!
REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
Thanks to Moritz Lenz for his suggestion for the name of this module.
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::Compilation(3pm)