I want to check, inside a bash script (*), how long the user of a X session has been idle.
The user himself does not have to be using bash, but just X. If the user just moved the mouse, for example, a good answer would be "idle for 0 seconds".
I want to write a script that will show how many minutes the user is idle. Since the last touch of the keyboard and mouse. Example:
#!/bin/bash
while true
do
command_lines...
...
sleep 60
echo $var
done
Result:
The computer/user is idle for 1 minute.
The computer/user is idle for 2 minute.
...
The computer/user is idle for 5 minute.
...
Can we do that?
utility atop shows:
ATOP - MyServer 2013/01/07 00:03:57 10 seconds elapsed
PRC | sys 2.18s | user 8.33s | #proc 141 | #zombie 0 | #exit 0 |
CPU | sys 21% | user 139% | irq 0% | idle 228% | wait 11% |
cpu | sys 5% | user 40% | irq 0% | idle 51% | cpu002 w 3% |
cpu | sys 5% | user 35% | irq 0% | idle 56
Figured I'll ask here before doing a bug report...
Symptom: "w" reports indefinitely increasing idle time for X users since last boot (idle times for text console logins are normal).
Cause: atime on /dev/tty7 that X is on is not getting bumped.
Suspected cuplrit: Xorg
Config: 12.04.1 w/ slim display manager and fvwm window manager via traditional Xsession setup.
I first no
I'm running a quite heavy number crunching thing on a few 4 core servers, all running Ubuntu Precise Pangolin LTS 64 bit, in the cloud (so I suppose in a virtualized environment).
To monitor the cpu usage, i wrote a .sh that uses "top -b -n 1" (that is a single run of top, only the first "frame") and merges it with some other data, to write a small report.
However, top always reported 64% idle o
I am on fedora 17 with GNOME 3.4.2 and have installed python's IDLE but to get to it I have to run,
Code:
idle
in terminal every time i want to use it and was wondering if there is anyway I could create an icon that I could search for in the application search bar.
Any help would be appreciated
I'm running several django sites on uwsgi, and I'm attempting to optimise my configuration for memory usage, but the --idle and --die-on-idle flags don't seem to be doing anything.
Each daemon starts off at around 10-12MB and increases to around 30MB once it has served a request, but then stays there even when idle for some time.
I want to setup a number of guests with multiple CPUs (4) and at least 4Gb ram running Ubuntu Linux.
I tried to use awk command on centos 5.5 with cat test.txt|awk '{idle+=$idle;idle=-idle}END{print $idle}'; and in the test.txt file contain above number10 1001000 10000... [by migkie]