08-13-2012
Thanks, but normal use ionice not allowed is there some restrictions..........
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Just a quick message to say great work to Neo and any others who have helped with the upgrade - the layout, appearance and functionality of this forum ROCKS.
By far the best I have seen.
Excellent! (1 Reply)
Discussion started by: alwayslearningunix
1 Replies
2. UNIX for Dummies Questions & Answers
Can someone tell me .. how to find a user & process who has executed nice (scheduled priority) to one of his process. .Tks.. (5 Replies)
Discussion started by: sivan
5 Replies
3. UNIX for Advanced & Expert Users
Under, Solaris 10 I have the following problem:
A script executed at command line runs with nice level 0, as expected.
Same script started under (user) crontab runs with nice level 2.
I would prefer it run at 0. Is this possible? If so, how?
Thanks. (0 Replies)
Discussion started by: henrydark
0 Replies
4. UNIX for Dummies Questions & Answers
Can someone tell me this. thanks (1 Reply)
Discussion started by: xoxouu
1 Replies
5. Programming
Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Discussion started by: tejbuch
2 Replies
6. UNIX for Dummies Questions & Answers
hello everybody:
I have some job running on tru64 system and Im the root, due to limited resources I end up with my job ( vdump) for example taking the lowest share, I researched the nice command on the net, but couldnt get enough info, can I use it to already running process or I only use it... (1 Reply)
Discussion started by: aladdin
1 Replies
7. UNIX for Advanced & Expert Users
Hello,
Some guy said to me that using the nice command to decrease the priority of a process is a myth, that the operating system corrects the priorities as the processes need cpu. Is this true? (4 Replies)
Discussion started by: psimoes79
4 Replies
8. Shell Programming and Scripting
Hello,
I am just starting with shell scripting, as everyone will soon see from my question. What I'm trying to do is call the Nice command to set the script process priority from /bin/ksh. The difference is I'm running it not directly through the shell, but through Bigfix (very similar to... (3 Replies)
Discussion started by: solly119
3 Replies
9. BSD
Hello Folks,
Recently our FreeBSD 7.1 i386 system became very sluggish.
Nothing much is happening over there & whatever is running takes eternity to complete.
All the troubleshooting hinted towards a very high nice percentage.
Can that be the culprit?
Pasting snippets of top command,... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
10. Shell Programming and Scripting
with using wall command, how can i have a carriage return in my broadcast message. i try to broadcast from a file, i were to use "cat myfile | wall" for broadcasting. but when the message broadcast somehow the format run away.
this the text in my file:
line 1
line 2
line 3
when broadcast
... (3 Replies)
Discussion started by: lsy
3 Replies
LEARN ABOUT DEBIAN
sg_get_cpu_percents
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)