09-09-2009
script check the users in SHELL every 1 minute ?
could you please find a solution for this:
I need to write a shell script which checks after every minute whether a friend has logged in or not.The script should report whether that person has logged in along with the amount of time the person was late in logging in.
I have no idea how to do this bcoz i'm really new to it,and it would be really nice if someone could help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys, I would appreciate if someone can help me for this task:
I have a large txt file that contains lots of user ids in different format. I need to run this against a database output ldif file and print to a file whether they exist or not. And if they exist then I need to print their... (9 Replies)
Discussion started by: cmontr
9 Replies
2. Shell Programming and Scripting
could you please find a solution for this
script that checks if any of a list of users given on the command line is logged in. For each user the script should say whether this user is logged in or not. The script prints an error message if no parameter is given. And ask the user to enter a name... (3 Replies)
Discussion started by: anything
3 Replies
3. OS X (Apple)
Hello everyone,
Not sure if this is the right place, but OS X isn't your standard Unix, so I figured here would be best. I am looking at creating a script that will be interactive that admins can run to create users.
Now, 10.4 uses netinfo database and netinfo manager to handle it's users. ... (3 Replies)
Discussion started by: tlarkin
3 Replies
4. Shell Programming and Scripting
Hi all, I am needing a bash shell script to generate a list of the top 5 users using the most disk space. I am thinking that the du command would be used somehow but I am at a loss. Can anyone help? Thanks! (3 Replies)
Discussion started by: sytemx
3 Replies
5. Shell Programming and Scripting
Hi,
Here is the script that I have written to check if a particular user is has logged out, and if yes, then a mail needs to be sent to the management the details of whatever has been captured by the script command.
echo "The current users are:"
who | awk '{print $1}' | sort > temp1
cp... (1 Reply)
Discussion started by: ggayathri
1 Replies
6. Shell Programming and Scripting
echo -e "Enter in a username : \c"
read username
grep "^$username:" /etc/passwdWhat I'm trying to do is take in a username from my script and I need to be able to check if that username already exists. If it does the script should display a message saying that the user already exists and exit.
... (2 Replies)
Discussion started by: shadowcat
2 Replies
7. Shell Programming and Scripting
Following on from this post:
https://www.unix.com/shell-programming-scripting/150201-simple-script-mount-folder-all-users-home.html
and getting told off for bumping the thread:(
Please could someone help me with a short script to check is a certain directory is present in /home for all users... (8 Replies)
Discussion started by: barrydocks
8 Replies
8. Shell Programming and Scripting
Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
this is my log:
xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Discussion started by: jockx
8 Replies
9. Shell Programming and Scripting
Dear all, I'm stuck on Solaris 9 bash (I believe is quite different from Linux system) trying to find a solution.
I have one file named like:120629-1750-TERZ81_AS_YTR.txt
YYMMDD-HH-MM-......The script should compare the actual date with the one reported on the file name and then take an action... (4 Replies)
Discussion started by: Lord Spectre
4 Replies
10. Shell Programming and Scripting
How to check log size every 10min. by script (can use crontab)
if log size not change with alert "Log not update"
Base run on SunOS 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
logFiles="log1.log log2.log"
logLocation="/usr/home/test/log/"
Out put.
Tue Jan 31... (3 Replies)
Discussion started by: ooilinlove
3 Replies
ruptime(1) General Commands Manual ruptime(1)
NAME
ruptime - show status of local machines
SYNOPSIS
DESCRIPTION
outputs a status line for each machine on the local network that is running the daemon. status lines are formed from packets broadcast
once every 3 minutes between daemons (see rwhod(1M)) on each host on the network. Each status line has a field for the name of the
machine, the status of the machine (up or down), how long the machine has been up or down, the number of users logged into the machine, and
the 1-, 5- and 15-minute load averages for the machine when the packet was sent.
The status of the machine is reported as ``up'' unless no report has been received from the machine for 11 minutes or more.
The length of time that the machine has been up is shown as:
Load averages are the average number of jobs in the run queue over the last 1-, 5- and 15-minute intervals when the packet was sent.
An example status line output by might be:
The above status line would be interpreted as follows:
is presently ``up'' and has been up for 1 day, 5 hours and 15 minutes. It currently has 7 users logged in. Over the last 1-minute inter-
val, an average of 1.47 jobs were in the run queue. Over the last 5-minute interval, an average of 1.16 jobs were in the run queue. Over
the last 15-minute interval, an average of 0.80 jobs were in the run queue.
If a user has not used the system for an hour or more, the user is considered idle. Idle users are not shown unless the option is speci-
fied.
Options
If no options are specified, the listing is sorted by host name. Options change sorting order as follows:
Sort by load average.
Sort by up time.
Sort by the number of users.
Reverse the sort order.
DIAGNOSTICS
No status report files in
Ask the system administrator to check whether the daemon is running.
AUTHOR
was developed by the University of California, Berkeley.
FILES
Data files
SEE ALSO
rwho(1), rwhod(1M).
ruptime(1)