View Full Version : /var/log/wtmp
troubleshootr
04-13-2006, 10:16 PM
This file seems to be getting very big (over 150M on my 770). If I delete it, it will get generated again by the system. I linked it to /dev/null and have noticed no ill affect. In fact I can now load complex web pages that used to force a reboot. Since I really do not care about logging on my 770, is there any downside to doing this?
troubleshootr
04-13-2006, 10:25 PM
Never mind, I found what I needed on the mailing list. That was strange. Anyway, my 770 seems to be much more stable with the wtmp file linked to null.
rattis
04-13-2006, 10:29 PM
Never mind, I found what I needed on the mailing list. That was strange. Anyway, my 770 seems to be much more stable with the wtmp file linked to null.
You can (or at least should be able to) delete it with no ill affects. It'll get recreated everytime you reboot (shutdown restart).
I'm curious now what is in wtemp on this thing. I never thought to look..
troubleshootr
04-13-2006, 10:40 PM
You can (or at least should be able to) delete it with no ill affects. It'll get recreated everytime you reboot (shutdown restart).
I'm curious now what is in wtemp on this thing. I never thought to look..
It is a system log file that tracks mostly login events on the 770. It seems to grow larger and larger with use. It will even increase in size every time you put the 770 in its case. I really do not see a need for it. I linked mine to /dev/null which is the "black hole". Any system writes to the file will essentially disappear. It seems to run much better this way. It has been a couple days now configured this way.
jayholler
04-13-2006, 10:50 PM
what did you enter on the command line?
i tried:
ln /var/log/wtmp /dev/null
but i get the error:
ln: /dev/null: Invalid cross-device link
not sure what to do here.
any ideas?
troubleshootr
04-13-2006, 11:27 PM
what did you enter on the command line?
i tried:
ln /var/log/wtmp /dev/null
but i get the error:
ln: /dev/null: Invalid cross-device link
not sure what to do here.
any ideas?
As root
rm /var/log/wtmp
ln -s /dev/null /var/log/wtmp
rattis
04-14-2006, 12:16 AM
It is a system log file that tracks mostly login events on the 770. It seems to grow larger and larger with use. It will even increase in size every time you put the 770 in its case. I really do not see a need for it. I linked mine to /dev/null which is the "black hole". Any system writes to the file will essentially disappear. It seems to run much better this way. It has been a couple days now configured this way.
Mine only shows the reboots. The fact that its there means that the last command is too. Shows who's been logging in. I agree though, it is kind of pointless to have, and like I said, you should be able to remove it no problems.
troubleshootr
04-14-2006, 12:26 AM
Mine only shows the reboots. The fact that its there means that the last command is too. Shows who's been logging in. I agree though, it is kind of pointless to have, and like I said, you should be able to remove it no problems.
If you delete it, it will come back. It gets huge. Really huge. If you type:
ls -lh /var/log/wtmp
in Xterm it will display the file size. The size is at least several Megabytes, even soon after it is deleted it will grow to a large size. For a portable device with limited resources, this seems not so good. What is the size of your /var/log/wtmp?
jayholler
04-14-2006, 12:59 AM
thanks, that did the trick.
mine is 21.5M
-rw-r--r-- 1 root root 21.5M Apr 14 00:56 /var/log/wtmp
btw, I am using the extrootfs script, so 21M wasn't too bad considering I have 680 free. But still, hopefully things will be a little more stable.
I don't think these values are very significant or trustworthy. I had never heard of that file before, and when I checked after reading this on my 770 it appeared with a size of 231 MB ! Obviously not possible on a "stock" unit (no swap on MMC etc.). After deleting it and linking it to /dev/null as above I didn't see any change in memory occupation, either.
troubleshootr
04-14-2006, 06:25 AM
I don't think these values are very significant or trustworthy. I had never heard of that file before, and when I checked after reading this on my 770 it appeared with a size of 231 MB ! Obviously not possible on a "stock" unit (no swap on MMC etc.). After deleting it and linking it to /dev/null as above I didn't see any change in memory occupation, either.
I believe it is compressed. I found this has been discussed before, see here:
http://www.gossamer-threads.com/lists/maemo/users/6417
This file is stored in the flash memory area of the 770. This area has limited number of writes, so I feel it probably good to not have this file consistently getting updated on the 770. Then again I may be wrong. My unit has not rebooted itself at all after linking wtmp to null. YMMV.
Thanks for the link. Not much info there, but at least I see I'm not alone :-)
I'll see if it changes anything in my 770's behaviour, but then it wasn't in the habit of rebooting itself routinely, so...
dandrewk
04-14-2006, 12:29 PM
Stability is the key. If the 770 is logging every action to that file, it may be putting unnecessary loads on the CPU.
There are many reasons for the 770 (or any other device) to hang. Eliminating potential reasons is worthwhile.
rattis
04-14-2006, 04:35 PM
I don't think these values are very significant or trustworthy. I had never heard of that file before, and when I checked after reading this on my 770 it appeared with a size of 231 MB ! Obviously not possible on a "stock" unit (no swap on MMC etc.). After deleting it and linking it to /dev/null as above I didn't see any change in memory occupation, either.
Its the file used for the command last. Last tells you who has been logging into the box. It's a nice little command to see what kind of usuage you're box is getting. There is another file, not on the 770 but in linux called /var/log/btmp which is used with lastb to tell you who the last bad login attempts were from.
troubleshootr
04-14-2006, 05:25 PM
Its the file used for the command last. Last tells you who has been logging into the box. It's a nice little command to see what kind of usuage you're box is getting. There is another file, not on the 770 but in linux called /var/log/btmp which is used with lastb to tell you who the last bad login attempts were from.
Interesting
With wtmp linked to /dev/null the "last" command gives
wtmp begins Wed Dec 31 19:00:08 1969
I wonder where it is getting this date in 1969 from.
I agree about "last". I use it all the time on my Linux boxes. I do not see a need for it on the 770 since it is usually in my pocket. The "last" command also told of all reboots, which might provide usefull on the 770.
rattis
04-14-2006, 05:29 PM
Interesting
With wtmp linked to /dev/null the "last" command gives
wtmp begins Wed Dec 31 19:00:08 1969
I wonder where it is getting this date in 1969 from.
.
I get the same date, and I'm not linking the file to null.
msaunby
04-15-2006, 04:27 AM
The Unix epoch began at 0000 GMT on 1st Jan 1970. Adjust for your timezone and that's what a null date is on a Unix like system.
troubleshootr
04-15-2006, 07:53 AM
The Unix epoch began at 0000 GMT on 1st Jan 1970. Adjust for your timezone and that's what a null date is on a Unix like system.
Thanks. I tried setting the timezone on the 770, but it does not seem to work.
Nokia770-51:~# tzconfig
/usr/sbin/tzconfig: 45: tempfile: not found
Your current time zone is set to US/Eastern
Do you want to change that? [n]: n
Your time zone will not be changed
Nokia770-51:~# echo $TZ
Nokia770-51:~#
qwright
04-28-2006, 05:26 PM
tzconfig can be made to do a little more, but it needs extra timezone files in /usr/share/zoneinfo.
I copied UTC and London across from a Ubuntu system.
tzconfig gives "invalid date" errors and won't report the time, but now the Daylight saving zone toggle is active in Control Panel/Date and time.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.