04-07-2008
I am aware of this command along with the who command, I have looked at the source for these files and they use the time now-last access of tty, I would like to determine idle time by using stdin somehow. Also, Id like to be gangster and write it in C.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guru's,
How do I find and set the login idle time setting in HP-UX 32?
Thanks in advance,
Mani (1 Reply)
Discussion started by: jvmani
1 Replies
2. Shell Programming and Scripting
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)
Discussion started by: Krrishv
36 Replies
3. HP-UX
Since yesterday the vmstat command is displaying the cpu idle time at 100%At each time interval. It never changes. Not sure what it means other than it Quit calculating that stat. And I'm curious why. Using sar I can display a correctCpu idle percent, but vmstat does not. Any ideas why or... (2 Replies)
Discussion started by: tfrye
2 Replies
4. UNIX for Advanced & Expert Users
Hi All
I need to find the idle time of a user... but my OS seems to be not supporting finger
$ finger
-sh: finger: command not found
I need to find the idle time and perform some other operations... So is there any other way i can find the idle time of a user...
$ uname -a... (2 Replies)
Discussion started by: Whiteboard
2 Replies
5. HP-UX
HP-UX B.11.23 ia64
Hi everyone,
First of all I am new member to this forum. Thankyou all for this forum, it helped me many times.
Coming to my question,I am writing a C program to find the log info of the users who are currently logged in(precisely what who -u do).
I am able to get... (0 Replies)
Discussion started by: bhiku matre
0 Replies
6. UNIX for Advanced & Expert Users
I need to find the idle time on a machine in the manner: How long time ago somebody did the last action with mouse or keyboard? Unfortunately "w" doesn't do this. It produced the following output on a machine a user was actually working on with an application:
15# w
15:55:28 up 15 days, ... (1 Reply)
Discussion started by: elbrand
1 Replies
7. Red Hat
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)
Discussion started by: jxh461
8 Replies
8. Shell Programming and Scripting
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies
9. Shell Programming and Scripting
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)
Discussion started by: wimaxpole
9 Replies
10. Shell Programming and Scripting
I want to get average idle time of the server using mpstat. The problem I am having is %idle is not in same columns in all the versions of linux.
example 1:
example 2:
I tried below command as generalized solution but as Average as one less column output is not proper.
I am... (1 Reply)
Discussion started by: kumarjohn
1 Replies
LEARN ABOUT REDHAT
glutidlefunc
glutIdleFunc(3GLUT) GLUT glutIdleFunc(3GLUT)
NAME
glutIdleFunc - sets the global idle callback.
SYNTAX
void glutIdleFunc(void (*func)(void));
ARGUMENTS
func The new idle callback function.
DESCRIPTION
glutIdleFunc sets the global idle callback to be func so a GLUT program can perform background processing tasks or continuous animation
when window system events are not being received. If enabled, the idle callback is continuously called when events are not being received.
The callback routine has no parameters. The current window and current menu will not be changed before the idle callback. Programs with
multiple windows and/or menus should explicitly set the current window and/or current menu and not rely on its current setting.
The amount of computation and rendering done in an idle callback should be minimized to avoid affecting the program's interactive response.
In general, not more than a single frame of rendering should be done in an idle callback.
Passing NULL to glutIdleFunc disables the generation of the idle callback.
EXAMPLE
A typical idle callback to animate a window might look like:
void
idle(void)
{
time += 0.05;
glutSetWindow(window);
glutPostRedisplay();
}
Notice how the idle callback does not do any actual drawing; it only advances the time scene state global variable. That is left to the
window's display callback which will be triggered by the call to glutPostRedisplay.
If you use the idle callback for animation, you should be sure to stop rendering when the window is not visible. This is easy to set up
with a visibility callback. For example:
void
visible(int vis)
{
if (vis == GLUT_VISIBLE)
glutIdleFunc(idle);
else
glutIdleFunc(NULL);
}
If you do use the idle callback for animation, one thing you should not do is setup the idle callback before calling glutMainLoop. It is
much better to use the visibility callback to install idle callback when the window first becomes visible on the screen.
SEE ALSO
glutTimerFunc, glutVisibilityFunc
AUTHOR
Mark J. Kilgard (mjk@nvidia.com)
GLUT
3.7 glutIdleFunc(3GLUT)