Re: [maemo-developers] Zapped wtmp...

2006-04-13 Thread Kimmo Hämäläinen
Hi,

We have a 'temp reaper' daemon for deleting some temporary files that
have not been used for some time (e.g. temporary E-mail attachments):

https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-af-utils/src/temp-reaper.c

It only seems to clear '/var/tmp' currently. I don't know why we have
missed the wtmp file...

A skilled do-it-yourself man could add '/var/log' there, recompile, and
replace the binary. It should work if wtmp is not touched too often and
it's not kept open by any program.

BR; Kimmo

On Wed, 2006-04-12 at 17:34, ext Nils Faerber wrote:
 Hi!
 I thought I should let you know...
 
 I am not sure if I really found any cure to anything but after the
 latest discussions about the size of wtmp I checked mine on the 770 and
 found a more than 200MB file!
 
 After gzip'ping it it shrank to just 5MB because it contains almost only
 0s. But there must be the information for 200MB stored somewhere in the
 JFFS2 so I guess that even if it only has 5MB as a comporessed file the
 impact on a JFFS2 can be much worse.
 
 So I enabled the RD mode, became root and linked /var/log/wtmp to
 /dev/null (who cares for this wtmp on the 770 anyway?).
 
 Before I did this I saw more and more weird phenomena on the device,
 like crashing browser and spurious power-offs when case closed (almost
 100% battery, closed device one night, next morning it was powered off
 and had to be rebooted!).
 
 Now after I zapped wtmp I have the feeling (!) that it behaves much
 better again! I can browse pages that before did not work and I hope
 that the power-downs are history now too (for the last three days they
 are but you never know).
 
 Maybe someone else likes to try to this too and report his/her
 experience here.
 
 Probably wtmp should be linked to /dev/null in the next software release
 too.
 
 BTW: With every closure of the case the wtmp grows by about 3kB. You can
 estimate with your usage how big it will get...
 
 Cheers
   nils faerber
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-13 Thread Jonathan Matthews-Levine
On 4/13/06, Kimmo Hämäläinen [EMAIL PROTECTED] wrote:
 Hi,

 We have a 'temp reaper' daemon for deleting some temporary files that
 have not been used for some time (e.g. temporary E-mail attachments):

 https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-af-utils/src/temp-reaper.c

 It only seems to clear '/var/tmp' currently. I don't know why we have
 missed the wtmp file...

Is there any possible downside to deleting wtmp?  Mine is over 200mb now ...

Jonathan

--
Don't anthropomorphize computers. They don't like it.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-13 Thread Nils Faerber
Kimmo Hämäläinen schrieb:
 Hi,
Hi!

 We have a 'temp reaper' daemon for deleting some temporary files that
 have not been used for some time (e.g. temporary E-mail attachments):
 
 https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-af-utils/src/temp-reaper.c

Interesting...

 It only seems to clear '/var/tmp' currently. I don't know why we have
 missed the wtmp file...

Interestingly an older firmware image (W48-someting) did not write a
wtmp! Just checked on another not yet updated device.
So this must have been intriduced somewhere between W48 and W52.

 A skilled do-it-yourself man could add '/var/log' there, recompile, and
 replace the binary. It should work if wtmp is not touched too often and
 it's not kept open by any program.

I guess this would not work since wtmp is written to with every close of
the 770 case (for whatever reason). so it will be modified too often -
at least in my case since I open the 770 at least once to 10 times a day.

 BR; Kimmo
Cheers
  nils


 On Wed, 2006-04-12 at 17:34, ext Nils Faerber wrote:
 Hi!
 I thought I should let you know...

 I am not sure if I really found any cure to anything but after the
 latest discussions about the size of wtmp I checked mine on the 770 and
 found a more than 200MB file!

 After gzip'ping it it shrank to just 5MB because it contains almost only
 0s. But there must be the information for 200MB stored somewhere in the
 JFFS2 so I guess that even if it only has 5MB as a comporessed file the
 impact on a JFFS2 can be much worse.

 So I enabled the RD mode, became root and linked /var/log/wtmp to
 /dev/null (who cares for this wtmp on the 770 anyway?).

 Before I did this I saw more and more weird phenomena on the device,
 like crashing browser and spurious power-offs when case closed (almost
 100% battery, closed device one night, next morning it was powered off
 and had to be rebooted!).

 Now after I zapped wtmp I have the feeling (!) that it behaves much
 better again! I can browse pages that before did not work and I hope
 that the power-downs are history now too (for the last three days they
 are but you never know).

 Maybe someone else likes to try to this too and report his/her
 experience here.

 Probably wtmp should be linked to /dev/null in the next software release
 too.

 BTW: With every closure of the case the wtmp grows by about 3kB. You can
 estimate with your usage how big it will get...

 Cheers
   nils faerber

-- 
kernel concepts  Tel: +49-271-771091-12
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen  Mob: +49-176-21024535
--
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-13 Thread Nils Faerber
Jonathan Matthews-Levine schrieb:
 On 4/13/06, Kimmo Hämäläinen [EMAIL PROTECTED] wrote:
 We have a 'temp reaper' daemon for deleting some temporary files that
 have not been used for some time (e.g. temporary E-mail attachments):
 https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-af-utils/src/temp-reaper.c
 It only seems to clear '/var/tmp' currently. I don't know why we have
 missed the wtmp file...
 Is there any possible downside to deleting wtmp?  Mine is over 200mb now ...

Not that I knew of.
I have mine linked to /dev/null for several days now and everything
seems very normal (even more normal than before ;)

And as I just found out (posted in other post) older software releases,
namely W48 and probably before, did not write a wtmp.

So I guess this is simpl a configuration bug in the latest software version.

 Jonathan
Cheers
  nils faerber

-- 
kernel concepts  Tel: +49-271-771091-12
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen  Mob: +49-176-21024535
--
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-13 Thread Andrew Flegg
On 4/13/06, Nils Faerber [EMAIL PROTECTED] wrote:

 Interestingly an older firmware image (W48-someting) did not write a
 wtmp! Just checked on another not yet updated device.
 So this must have been intriduced somewhere between W48 and W52.

My W42 device has not yet been reflashed and has a wtmp file, but only
430KB - it's never been cleared down, AFAIK.

Cheers,

Andrew

--
Andrew Flegg -- mailto:[EMAIL PROTECTED]  |  http://www.bleb.org/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-12 Thread Michael Saunby
I don't know about JFFS2 but back in the old days before Linux yuo 
could be pretty sure that a Unix filesystem didn't waste space storing 
null bytes.   Wtmp and other system files (databases?) take advantage 
of this.


Now you've made me aware of this I've deleted /var/log/wtmp.  I doubt 
it was using as much storage as you suggest but if I'd really been 
thinking I'd have done a df before and after - maybe someone else 
will.


There's no need to link it to anything.  If the file isn't there, then 
logging is turned off - at least that's what should happen.


Michael

- Original Message - 
From: Nils Faerber [EMAIL PROTECTED]

To: maemo-developers@maemo.org
Sent: Wednesday, April 12, 2006 3:34 PM
Subject: [maemo-developers] Zapped wtmp...



Hi!
I thought I should let you know...

I am not sure if I really found any cure to anything but after the
latest discussions about the size of wtmp I checked mine on the 770 
and

found a more than 200MB file!

After gzip'ping it it shrank to just 5MB because it contains almost 
only
0s. But there must be the information for 200MB stored somewhere in 
the
JFFS2 so I guess that even if it only has 5MB as a comporessed file 
the

impact on a JFFS2 can be much worse.

So I enabled the RD mode, became root and linked /var/log/wtmp to
/dev/null (who cares for this wtmp on the 770 anyway?).

Before I did this I saw more and more weird phenomena on the device,
like crashing browser and spurious power-offs when case closed 
(almost
100% battery, closed device one night, next morning it was powered 
off

and had to be rebooted!).

Now after I zapped wtmp I have the feeling (!) that it behaves much
better again! I can browse pages that before did not work and I hope
that the power-downs are history now too (for the last three days 
they

are but you never know).

Maybe someone else likes to try to this too and report his/her
experience here.

Probably wtmp should be linked to /dev/null in the next software 
release

too.

BTW: With every closure of the case the wtmp grows by about 3kB. You 
can

estimate with your usage how big it will get...

Cheers
 nils faerber

--
kernel concepts  Tel: +49-271-771091-12
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen  Mob: +49-176-21024535
--
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-12 Thread Santeri Lindgren

Michael Saunby wrote:
I don't know about JFFS2 but back in the old days before Linux yuo could 
be pretty sure that a Unix filesystem didn't waste space storing null 
bytes.   Wtmp and other system files (databases?) take advantage of this.


Now you've made me aware of this I've deleted /var/log/wtmp.  I doubt it 
was using as much storage as you suggest but if I'd really been thinking 
I'd have done a df before and after - maybe someone else will.


There's no need to link it to anything.  If the file isn't there, then 
logging is turned off - at least that's what should happen.


Wrong, this just deletes everything that is stored prior to this. And 
no, what you assume is wrong. Of course the log files should be 
erasable, and if user deletes the log file, then the system should just 
start making a new one.


Creating the log file if it's not there is the right thing. and turning 
off the logging should be done via config file.


And, my wtmp file was 96.5MB, will be posting if the linking helped 
anything. And yes, i have too found that the system is more sluggish 
than in the beginning of use. Even enabling swap-space on the mmc dont 
have any help anymore.


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-12 Thread Michael P. Lococo
 There's no need to link it to anything.  If the file isn't there, then
logging is turned off - at
 least that's what should happen.

 Wrong, this just deletes everything that is stored prior to this. And
no, what you assume is
  wrong. Of course the log files should be erasable, and if user deletes
the log file, then the
 system should just start making a new one.

Without addressing the question of what the behavior should be, man wtmp
on my FC4 system states that logging is disabled if wtmp doesn't exist:

   wtmp is maintained by login(1),  init(1),  and  some  versions  of
getty(1).
   Neither  of  these  programs  creates the file, so if it is removed,
   record-keeping is turned off.

If you've confirmed that the 770 handles things differently, that's useful
information.  Your tone is somewhat excessive, though, especially
considering that Michael Saunby's claim is supported by at least some
related documentation.

Mike




___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Zapped wtmp...

2006-04-12 Thread Santeri Lindgren

Michael P. Lococo wrote:

There's no need to link it to anything.  If the file isn't there, then

logging is turned off - at

least that's what should happen.

Wrong, this just deletes everything that is stored prior to this. And

no, what you assume is

 wrong. Of course the log files should be erasable, and if user deletes

the log file, then the

system should just start making a new one.


Without addressing the question of what the behavior should be, man wtmp
on my FC4 system states that logging is disabled if wtmp doesn't exist:

   wtmp is maintained by login(1),  init(1),  and  some  versions  of
getty(1).
   Neither  of  these  programs  creates the file, so if it is removed,
   record-keeping is turned off.

If you've confirmed that the 770 handles things differently, that's useful
information.  Your tone is somewhat excessive, though, especially
considering that Michael Saunby's claim is supported by at least some
related documentation.

Mike


Sorry if it feels like that, it wasn't meant to be like that. But, yes, 
the wtmp is created after it is removed.


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers