08-27-2009
Prstat Cron Schedule
Hi ,
I am trying to set up a cron job for getting the prstats for every 10 minutes to a log file.
prstat -s cpu -n 20 > a.txt
The issue is when i try to execute this command, a.txt is filling up with data for every second which is not i wanted.I just need top 20 processes for every 10 minues. How to get out of the session immediately after getting top 20 processes in the file and start the session again after 10 minues?
Could you please advise?
Thanks
Sue
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
HI,
I need to schedule a no.of jobs using the cron facility.
I currently do two kinds of scheduling,one based on the database load(after the database is loaded the program will start) and the other is based on time.....(say 10.00a.m daily)
the problem is..........
When the database is loaded... (1 Reply)
Discussion started by: sireesha15
1 Replies
2. HP-UX
hi,
Initially I logged in as root and edited the root file in crontab -e. Have scheduled to run a command at 00:34 daily and have redirected the .
The /var/adm/cron/log file got updated for the first time
CMD: /test/command >> /temp/test
> root 14906 c Fri Jan 11 00:34:00 EST 2008
< ... (7 Replies)
Discussion started by: rakshit
7 Replies
3. Shell Programming and Scripting
the follwing script is running fine , when run from the ksh shell...it runs properly i.e. waits for a file "test.flag" and sends mail accordingly.
But when I schedule it in the crontab ...it does not run at the specified time (it never runs).
I am using ksh
####shell script starts
count=1... (4 Replies)
Discussion started by: ace@123
4 Replies
4. UNIX for Dummies Questions & Answers
I have cron scheduing that after hotbackup omniback kicks in and back up tape.
00 17 * * * /usr/local/bin/archbakPRD/mainPRDbackup.sh > /usr/local/bin/archbakPRD/dbfcopy.log 2 >&1
above cron can fired every night at 5PM but omnibackup need to have seperate name for each backup ( i.e:... (1 Reply)
Discussion started by: Paul.S
1 Replies
5. Shell Programming and Scripting
Hi,
How to write the recursive function.
I have a script,
#!/usr/bin/ksh
##
name=$1
outputfile='output.log'
sqlplus -s > ${outputfile} <<__END__
${USER}/${PASS}@${DB}
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
WHENEVER OSERROR EXIT FAILURE ROLLBACK
SET ECHO ON
SET SERVEROUTPUT... (3 Replies)
Discussion started by: sandy1028
3 Replies
6. Shell Programming and Scripting
Hi all,
I am new to cron jobs..
i wanted to schedule a cron job that wil send a mail to me at 3:00PM on 10th August ie is on Wednesday.
0 15 10 8 3 echo "message from UNIX here"|mail -s "your subject here" user@user.com
However this was not executed...
Can anyone please... (0 Replies)
Discussion started by: ch33ry
0 Replies
7. Linux
Hi,
I need to work around 20 boxes to compile list of scheduled jobs on all of them, and these could be set in Linux RHat:cron, or Windows:MKS scheduler, or Windows:scheduler.
Do you know how I can access those entries from script to have this whole list in sync, as we have it changed... (0 Replies)
Discussion started by: trento17
0 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Can anyone help me out with scheduling a cron job for the below:
i wnated to delete file from a folder on every sunday at 05:00 AM
this is code i have used.
*******************************************************
0 05 * * 0 find /abc/xyz/pqrs/bak/ -type f -mtime +30 -exec rm -f... (5 Replies)
Discussion started by: ch33ry
5 Replies
9. Shell Programming and Scripting
Hi All,
Is there any way (any utility) to schedule a job to run once in a week on RedHat Linux ?
Note- Do not using Crontab.
Thanks
Pravin (1 Reply)
Discussion started by: pravin27
1 Replies
10. HP-UX
Hope you can help with a queuy i have. Server OS is HP-UX
my cron runs like this:
* * * * * /test/scripts/1_min_jobs.sh 1>/dev/null 2>/dev/null
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /test/scripts/jobs_5mins.sh 1>/dev/null 2>/dev/null
0,15,30,45 * * * *... (10 Replies)
Discussion started by: davexxash
10 Replies
LEARN ABOUT LINUX
user-session-keyring
USER-SESSION-KEYRING(7) Linux Programmer's Manual USER-SESSION-KEYRING(7)
NAME
user-session-keyring - per-user default session keyring
DESCRIPTION
The user session keyring is a keyring used to anchor keys on behalf of a user. Each UID the kernel deals with has its own user session
keyring that is shared by all processes with that UID. The user session keyring has a name (description) of the form _uid_ses.<UID> where
<UID> is the user ID of the corresponding user.
The user session keyring is associated with the record that the kernel maintains for the UID. It comes into existence upon the first
attempt to access either the user session keyring, the user-keyring(7), or the session-keyring(7). The keyring remains pinned in existence
so long as there are processes running with that real UID or files opened by those processes remain open. (The keyring can also be pinned
indefinitely by linking it into another keyring.)
The user session keyring is created on demand when a thread requests it or when a thread asks for its session-keyring(7) and that keyring
doesn't exist. In the latter case, a user session keyring will be created and, if the session keyring wasn't to be created, the user ses-
sion keyring will be set as the process's actual session keyring.
The user session keyring is searched by request_key(2) if the actual session keyring does not exist and is ignored otherwise.
A special serial number value, KEY_SPEC_USER_SESSION_KEYRING, is defined that can be used in lieu of the actual serial number of the call-
ing process's user session keyring.
From the keyctl(1) utility, '@us' can be used instead of a numeric key ID in much the same way.
User session keyrings are independent of clone(2), fork(2), vfork(2), execve(2), and _exit(2) excepting that the keyring is destroyed when
the UID record is destroyed when the last process pinning it exits.
If a user session keyring does not exist when it is accessed, it will be created.
Rather than relying on the user session keyring, it is strongly recommended--especially if the process is running as root--that a session-
keyring(7) be set explicitly, for example by pam_keyinit(8).
NOTES
The user session keyring was added to support situations where a process doesn't have a session keyring, perhaps because it was created via
a pathway that didn't involve PAM (e.g., perhaps it was a daemon started by inetd(8)). In such a scenario, the user session keyring acts
as a substitute for the session-keyring(7).
SEE ALSO
keyctl(1), keyctl(3), keyrings(7), persistent-keyring(7), process-keyring(7), session-keyring(7), thread-keyring(7), user-keyring(7)
Linux 2017-03-13 USER-SESSION-KEYRING(7)