Everyday appending info about all processes which are active..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Everyday appending info about all processes which are active..
# 1  
Old 12-25-2008
Everyday appending info about all processes which are active..

I have problem but i didnt solve it. Could you help me? Smilie

Problem: Everyday at 12.17 we will append information to the file "log" about users who are logged and the information about all processes which are active to the user_activity file in our home directory..

I know that I must use cron entry and "w" comand. but i dont know how to go on..?

17 12 * * * date /home/mavikartal/script1 #cron entry, everyday 12.17
# 2  
Old 12-25-2008
this is a start to go with -

for the users logged in currently

Code:
w -h | awk '{ print $1 }' | sort -u

and the process information on what they are doing can be obtained from

Code:
ps -fu $user

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Display info about users (UID GID processes terminal)

I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made. 1. The problem statement, all variables and given/known data: The task is to create a script which prints information about users whose names are specified in the... (2 Replies)
Discussion started by: kornfan
2 Replies

2. AIX

Wtmp empty everyday

Anyone got experience where wtmp logs get truncated everyday? Though sulog, failedlogin and lastlog seems to be fine. The server uptime is 18 days running on AIX 5.3. Sorry this seems to be a generic questions but never really encountered before. (6 Replies)
Discussion started by: depam
6 Replies

3. Shell Programming and Scripting

How do I calculate total number of active and non active hosts?

#!/bin/bash for digit in $(seq 1 10) do if ping -c1 -w2 192.168.1.$digit &> /dev/null then echo "192.168.1.$digit is UP" else echo "192.168.1.$digit is DOWN" fi done (3 Replies)
Discussion started by: fusetrips
3 Replies

4. Solaris

Link based Active Active IPMP

Hi, I need to configure 4 ip address (same subnet and mask) in one ipmp group (two interfaces) in an active active formation (link based). Can some one provide the steps or a tutorial link. Thanks (2 Replies)
Discussion started by: Mack1982
2 Replies

5. Shell Programming and Scripting

determine the active processes on the system which are running since long time

Hi , Please help me shell script to determine the active processes on the system which are running since long time (2 Replies)
Discussion started by: itian2010
2 Replies

6. Shell Programming and Scripting

Need help on appending info from one file to other side by side

Hi All, I have a file abc.xls which contains data applciation usage merlin 24000 hermes 48000 and my script generates an output to a file def.xls applciation usage merlin 23000 hermes 50000 Daily i want to schedule this script to run and I need the second column to be appended to the... (2 Replies)
Discussion started by: jagadish_gaddam
2 Replies

7. AIX

Question about HACMP for active-active mode

Hi all, I am new to HACMP. So sorry for the newie question. But I did search the forum and it seems that no one asks this before. So if a 2-node cluster runs in active-active mode (and the same application), what is the benefit of using HACMP ? If it runs in active-stanby, it is easy to... (9 Replies)
Discussion started by: qiulang
9 Replies

8. Programming

getting certain info for all processes currently running

i am writing a utility that displays information about all the running processes in the /proc directory. I do not know how to get the following information for each of the processes in the /proc directory: -effective user id -effective user name -effective group id -effective group name... (3 Replies)
Discussion started by: Yifan_Guo
3 Replies
Login or Register to Ask a Question