09-05-2012
Thank you Jim for your answer.
However I am confused.
Could you please review this thread and give your comment?
https://www.unix.com/unix-advanced-ex...s-preempt.html
1. When a process(thread) is entering in syscall (times for example) this process(thread) is considered as "blocked" and column "b" in vmstat will be increased or not?
2. If not then when a process is considered as blocked?
3. Or a process is blocked only when it is waiting for something, as an example when it is waiting response from disk.
4. if a process has nothing to do then his state in prstat is "sleeping", right? If a process is inside syscall reading data from disk, "pread" for example, and this process is waiting now when real hard storage will return data then the state of the process is also sleeping, is it right?
Last edited by sant; 09-05-2012 at 03:27 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Is there a way I can assign processes to different processors? I know in windows xp you can set process affinity, and wondered if there is a *nix equivelant. (2 Replies)
Discussion started by: Solitare
2 Replies
2. UNIX for Dummies Questions & Answers
I am running solaris 9 on a SUn 480r. It is running SAS statistical software, these processes in full flow normally run at about 50-60% cpu (theres nothing else really running on the box) this is fine, and the SAS jobs get run nice and quick. However over the last few weeks everytime a SAS job is... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
3. Solaris
Hi,
I need to find which processes are hogging the cpu up. please advise.
Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies
4. AIX
I'm trying to monitor the CPU usage of a process and output that value to a file or variable. I know topas or nmon can tell me this in interactive mode but what I need is topas-looking output that allows me to write to a file after a discrete interval. Unlike nmon data collection to a file on top... (5 Replies)
Discussion started by: robot23
5 Replies
5. UNIX for Dummies Questions & Answers
hi,
i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies
6. UNIX for Dummies Questions & Answers
hi guys
you know we got an issue and my support line is linux I need to make sure my linux is OK...now the issue I have this process db2sysc reaching 10% CPU utilization yeah that's a DB2 process my DB guys wants to make sure linux is not the culprit but I have no idea
the situation is... (3 Replies)
Discussion started by: karlochacon
3 Replies
7. Red Hat
Hello All,
I am preparing a script to capture the processes consuming more CPU.
So is there any way that i can sort & redirect to file only those processes consuming more than 5.0 % using ps command itself.
Regards
Ankit (3 Replies)
Discussion started by: ajaincv
3 Replies
8. Emergency UNIX and Linux Support
Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking.
G (4 Replies)
Discussion started by: ggayathri
4 Replies
9. Shell Programming and Scripting
Is this possible as part of a bigger script to do?
eg:
elif
myprocess.bin cpu% > 12
exit 1
elif
is there a command for this?
thanks (9 Replies)
Discussion started by: bilboNIX
9 Replies
LEARN ABOUT DEBIAN
syscall
SYSCALL(2) Linux Programmer's Manual SYSCALL(2)
NAME
syscall - indirect system call
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
int syscall(int number, ...);
DESCRIPTION
syscall() is a small library function that invokes the system call whose assembly language interface has the specified number with the
specified arguments. Employing syscall() is useful, for example, when invoking a system call that has no wrapper function in the C
library.
syscall() saves CPU registers before making the system call, restores the registers upon return from the system call, and stores any error
code returned by the system call in errno(3) if an error occurs.
Symbolic constants for system call numbers can be found in the header file <sys/syscall.h>.
RETURN VALUE
The return value is defined by the system call being invoked. In general, a 0 return value indicates success. A -1 return value indicates
an error, and an error code is stored in errno.
NOTES
syscall() first appeared in 4BSD.
EXAMPLE
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
int
main(int argc, char *argv[])
{
pid_t tid;
tid = syscall(SYS_gettid);
tid = syscall(SYS_tgkill, getpid(), tid);
}
SEE ALSO
_syscall(2), intro(2), syscalls(2)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-08-14 SYSCALL(2)