IDLE(2) Linux Programmer's Manual IDLE(2)NAME
idle - make process 0 idle
SYNOPSIS
#include <unistd.h>
int idle(void);
DESCRIPTION
idle() is an internal system call used during bootstrap. It marks the process's pages as swappable, lowers its priority, and enters the
main scheduling loop. idle() never returns.
Only process 0 may call idle(). Any user process, even a process with superuser permission, will receive EPERM.
RETURN VALUE
idle() never returns for process 0, and always returns -1 for a user process.
ERRORS
EPERM Always, for a user process.
VERSIONS
Since Linux 2.3.13, this system call does not exist anymore.
CONFORMING TO
This function is Linux-specific, and should not be used in programs intended to be portable.
COLOPHON
This page is part of release 3.53 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-12-31 IDLE(2)
Check Out this Related Man Page
GETTID(2) Linux Programmer's Manual GETTID(2)NAME
gettid - get thread identification
SYNOPSIS
#include <sys/types.h>
pid_t gettid(void);
DESCRIPTION
gettid() returns the caller's thread ID (TID). In a single-threaded process, the thread ID is equal to the process ID (PID, as returned by
getpid(2)). In a multithreaded process, all threads have the same PID, but each one has a unique TID. For further details, see the dis-
cussion of CLONE_THREAD in clone(2).
RETURN VALUE
On success, returns the thread ID of the calling process.
ERRORS
This call is always successful.
VERSIONS
The gettid() system call first appeared on Linux in kernel 2.4.11.
CONFORMING TO
gettid() is Linux-specific and should not be used in programs that are intended to be portable.
NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2).
The thread ID returned by this call is not the same thing as a POSIX thread ID (i.e., the opaque value returned by pthread_self(3)).
SEE ALSO clone(2), fork(2), getpid(2)COLOPHON
This page is part of release 3.27 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 2008-04-14 GETTID(2)
Matez,
I have a list of process id's in a text file. I want to know how to find the idle time of a process which are more than 300secs and kill them accordingly.
Could you please help me to get these details. I want to write a shell script with this.
Thanks..Krish :) (36 Replies)
I need to do some code benchmarking in unix.
On windows, it is always recommended that before you run any kind of benchmark, that you execute the command
Rundll32.exe advapi32.dll,ProcessIdleTasks
which commits idle tasks, so that hopefully this does not happen in the middle of your benchmark... (9 Replies)
Hi,
In my network we uses the NetTerm program to connect us to HP-UX 10.x server from windows workstations, but in some cases the user doesn't logout and close it by window's x button. The problem is that in HP-UX the user and all his tasks remain active and when he enter again HP-UX creates a... (12 Replies)
Does anyone know how do you determine the user idle time of stdin in order to log the user out for being idle too long. I would like to write a c program to do this but I it is not clear upon how to determine idle time from keyboard input. (9 Replies)
Hi,
I am accessing a solaris server via client machine.
My problem is that every session is expiring within 1 minute if it kept idle. I am facing problem as i have to enter the credentials around 30 to 40 times per day.
I tried to set the TMOUT variable but it does n't work.
Please help... (7 Replies)
Newbie here, have looked using search engine and can find nothing revelant to my problem..
Using Linux
Here, I want to create a unix daemon (using C) that run to check user idle time, then if the idle time match the timeout, that console will be locked automatically
(user need to enter... (14 Replies)
Hi, I checking yesterday's SAR logs for one of our servers and it was showing that utilisation was down to 0% for 10 minutes at 2am. We're unaware of any jobs running at this time so need to find out which process caused this spike.
Is there anything built into SAR (or does anything else exist)... (11 Replies)
We recently underwent a security audit and have a new requirement to not allow users to stay logged on overnight. In order to place this policy into effect i need a way to check for idle users and log them off. Is there any good way to enforce this policy in Solaris 10 and make it work in such a... (11 Replies)
Hi All,
I am having a problem where my mouse (USB) is freezing after some idle time, and I am having to reboot everytime that happens.
I looked in the file /etc/X11/xorg.config to see if there is an entry for mouse and I could not find it. Instead I found the following entry:
Section... (8 Replies)
Our Aix Unix has one issue.
If I type xedit &
after 30 minutes, xedit auto shut down.
If I type xedit
xedit will run forward.
I feel this & doesn't perform as it should be.
When I use &, system consider this process as idle.
How to fix this issue?
Does this mean unix env... (12 Replies)
Hello..
I have many sleepy users on my Solaris box and need to kill them if they are idle for more than 45 minutes for example...I know who -u gives and the idle time but unable to make a awk line to get the condition perfect. Please help...:wall: (9 Replies)
does sftp connection closes by default if it stays idle for a prolonged time ?
i have checked sshd_config files , there is no time out value set. but still the connection closes after certain period of time.
Please help.
verbose mode output :
sftp> debug1: channel 0: free:... (10 Replies)
Hi
what does %idle reflect in SAR command
suppose SAR commamd is showing idle as 90%
does it means sytem is fine or sytem is in danger state.
below is the o/p of sar command and %idle is 90 then what does its means.
sar 1 4
AIX ab41cp01 3 5 000B3E0AD400 01/01/15... (17 Replies)
Hi
The telnet sessions stay as idle users. It is not getting kicked out.
Please advise what could be the issue. only when we reboot the server these telnet sessions goes.
Below is the current output from the server. we rebooted the server three days ago:
pmut6:/> uptime
04:21PM... (8 Replies)