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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
sg_get_cpu_stats_diff
sg_get_cpu_stats(3) Library Functions Manual sg_get_cpu_stats(3)NAME
sg_get_cpu_stats, sg_get_cpu_stats_diff, sg_get_cpu_percents - get cpu usage
SYNOPSIS
#include <statgrab.h>
sg_cpu_percents *sg_get_cpu_percents(void);
sg_cpu_stats *sg_get_cpu_stats(void);
sg_cpu_stats *sg_get_cpu_stats_diff(void);
DESCRIPTION
sg_get_cpu_stats() and sg_get_cpu_stats_diff() both return static pointers of type sg_cpu_stats. sg_get_cpu_stats() returns the total
amount of "ticks" the operating system has spent in each of the different states. sg_get_cpu_stats_diff() returns the difference in "ticks"
for each of the states since last time sg_get_cpu_stats_diff() or sg_get_cpu_stats() was called. If it has never been called, it will
return the result of sg_get_cpu_stats().
The value stored (the "ticks") will vary between operating systems. For example Solaris has a total of 100 per second, while Linux has sub-
stantially more. Also, different operating systems store different information - you won't find nice cpu on Solaris for example.
Because of this, you will ideally always want to work on a scale against the total, or in percentages.
sg_get_cpu_percents() returns a pointer to a static sg_cpu_percents. The function calls sg_get_cpu_stats_diff() and changes the values into
percentages. If it has never been called before (and nor has sg_get_cpu_stats() or sg_get_cpu_stats_diff()), the returned percentages will
be the systems total ever since its uptime. (Unless the counters have cycled)
RETURN VALUES
There are two structures returned by the CPU statistics functions.
typedef struct{
long long user;
long long kernel;
long long idle;
long long iowait;
long long swap;
long long nice;
long long total;
time_t systime;
}sg_cpu_stats;
typedef struct{
float user;
float kernel;
float idle;
float iowait;
float swap;
float nice;
time_t time_taken;
}sg_cpu_percents;
user kernel idle iowait swap nice
The different CPU states.
systime time_taken
The time taken in seconds since the last call of the function, or the system time.
SEE ALSO statgrab(3)WEBSITE
http://www.i-scream.org/libstatgrab/
i-scream $Date: 2005/04/25 11:25:45 $ sg_get_cpu_stats(3)