05-27-2013
Hi.
You can check in /etc/logrotate.conf
There is the way to rotate wtmp log file.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have problem but i didnt solve it. Could you help me? :)
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... (1 Reply)
Discussion started by: mavikartal
1 Replies
2. Shell Programming and Scripting
I need to capture the vmstat output of a server every 5 minutes, in a text filename with the name in the format vmoutput. yesterday's date.txt. I need to get the vmstat o/p for the whole day with 5 minutes interval and send it (preferably ftp) to my local desktop folder.
eg: vmstat 300... (1 Reply)
Discussion started by: yuvanash
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have a cronjob that i am currently running which is as follows:
php /home/****/cronjob.php --debug 2>&1 >> /home/cronjoboutput.txt
That, as you may know, logs the output to a file called cronjoboutput.txt in the home directory.
I want that cronjob to output to a different file... (6 Replies)
Discussion started by: umarsa
6 Replies
4. Shell Programming and Scripting
Hi,
Can someone help me in running a cronjob everyday between 7 and 8 pm with the time interval of 5 minutes in between to repeat that script. The script is so small and I need that to run daily between this time. Please if possible provide me the syntax for this logic.
Thanks. (4 Replies)
Discussion started by: cya
4 Replies
5. Shell Programming and Scripting
quick question:
I have a current script that will put the output on a log file. See snapshot of the code below. I wanted this to be rotated everyday based on date. So if anyone execute the script today there will be a filecreated such as sys.log.(datetoday), if tomorrow it would be... (1 Reply)
Discussion started by: lhareigh890
1 Replies
6. Shell Programming and Scripting
Hi
I want to execute a cron job everyday at 14:50 hrs. I have a script like this:
TMP_FILE="/tmp/tmpcron.txt"
RES=0
/usr/bin/crontab -l >> $TMP_FILE
ADD_JOB="50 14 * * * /opt/mypath/scriptname.sh"
grep "scriptname.sh" $TMP_FILE >> /dev/null
JOB_NOT_EXIST=$?
if test $JOB_NOT_EXIST... (2 Replies)
Discussion started by: saurabhkoar
2 Replies
7. UNIX for Dummies Questions & Answers
I am facing an Issue with a particular Unix Account ( ie a particular Userid) getting LOCKED everyday between 7:30am and 8:00am. The Password associated with this particular Account has been setup such that it should never Expire at all but it does LOCK the Account after more than 3 failed... (5 Replies)
Discussion started by: pchegoor
5 Replies
8. AIX
Hello,
I was trying to run a script on a dev server using cron job. It supposed to run 3rd sunday of every month.
45 4 15-21 * 0 /home/user1/myscript.sh >/dev/null 2>&1 # run this script 3rd sunday of every month
When I Schedule it on AIX server, It is running every day at 4:45 AM.
am I... (3 Replies)
Discussion started by: Kumar7997
3 Replies
LEARN ABOUT DEBIAN
rawtmp
RAWTMP(1) General Commands Manual RAWTMP(1)
NAME
rawtmp - display wtmp entries in raw form.
SYNOPSIS
rawtmp [-da] [-w wtmp|-] [-X[3|4]d] [-s start] [-e end] [-b H:M:S] [--help] [--version]
DESCRIPTION
Rawtmp is a utility to dump the raw data in a wtmp or utmp file to the screen for viewing. It may be useful to anyone who wishes to divine
the nature of the data stored in the wtmp or utmp files. It may also be useful to extract special wtmp entries that are not documented
anywhere (like those netdate puts in the wtmp file).
If on a logout, when the username is encoded in the ut_user field by replacing the first character of the username with a null, rawtmp will
print the contents of the user field with a leading dot '.' to denote the null character. Only agetty and tacacs control software are cur-
rently known to use this logging method.
OPTIONS
Rawtmp understands the following command line switches:
--help Outputs a verbose usage listing.
--version
Displays the version of rawtmp.
-w wtmp
Select a different input file instead of the default (/var/log/wtmp).
-X[3] Read a wtmp file maintained by versions 3.3 or 3.4 Tacacs terminal server access control software.
-X4 Read a wtmp file maintained by version 4.0 of Tacacs terminal server access control software.
-d Output the time in MMM DD HH:MM:SS format instead of raw time for a more human readable form (and to actually know what day you're
looking at!).
-a Print the contents of the ut_addr field (in quad-dotted notation) instead of using the ut_host field. Note: ut_addr is almost never
used and more than likely contains garbage information.
-b hours[:minutes[:seconds]]
Consider only those utmp entries that fall within the last few hours/minutes/seconds from the current time, disregarding the rest.
-s start
Selects the starting date of the report, in mm/dd/yy format.
-e end Selects the ending date of the report, in mm/dd/yy format.
FILES
/var/log/wtmp login database.
AUTHOR
Steve Baker (ice@mama.indstate.edu)
BUGS
Could use some filtering options.
SEE ALSO
last(1), sac(8)
UNIX Manual RAWTMP(1)