Need advise from RH hacks - ramdisk & log files

Need advise from RH hacks - ramdisk & log files

Post by Phil Ri » Thu, 29 Nov 2001 11:01:32



Looking for some fine tuning feedback from a few linux hacks..

I'd like to keep my hard disk from spinning up as much as possible.

I've got a RedHat 7.2 box serving as a home network combination:
        cable modem gateway/firewall
        web server
        file server
        print server

It doesn't get much traffic so I turned on the BIOS APM to spin
down the disk after 1 minute.  Unfortunately it keeps spinning
up every few minutes - which I attribute to system logging.

So, I intend to create a ramdisk filesystem and link the frequently
used log files into ram.  I've listed my logs and procs
below.  I've marked the logs I intend to move with a '*' in the
left most column.

I am a little leary of tinkering with the spew in the /proc area
so I'm hoping that just moving log files from the /var/log tree will
suffice.

Before I do that I'm looking for some feedback on any hidden gotchas.
  - Any issues moving the log files (ignoring space requirements).
  - Where to mk2efs & mount the ramdisk (it looks like I'll have to
    do it in rc.sysinit in order to beat the deamons to their log
    files)

Comments?  

Thanks in advance.

Quote:> ls -l /var/log

-rw-------    1 root     root        11131 Nov 26 09:43 boot.log
*rw-------    1 root     root        45226 Nov 26 09:43 cron
-rw-r--r--    1 root     root         4401 Nov 26 09:43 dmesg
drwxr-xr-x    2 root     root         4096 Nov 26 09:43 fax
drwxr-xr-x    2 root     root         4096 Nov 26 09:43 httpd
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.0
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.2
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.3
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.4
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.5
-rw-r--r--    1 root     root        46666 Nov 26 09:43 ksyms.6
-rw-r--r--    1 root     root       146292 Nov 26 09:43 lastlog
*rw-------    1 root     root          879 Nov 26 09:43 maillog
*rw-------    1 root     root        55217 Nov 26 09:44 messages
-rw-r--r--    1 root     root        11129 Nov 26 09:43 rpmpkgs
*rwxr-xr-x    2 root     root         4096 Nov 26 09:43 sa
*rwx------    2 root     root         4096 Nov 26 09:43 samba
-rw-------    1 root     root          826 Nov 26 09:43 secure
-rw-------    1 root     root            0 Nov 26 09:43 spooler
drwxr-x---    2 squid    squid        4096 Nov 26 09:43 squid
-rw-rw-r--    1 root     utmp       403584 Nov 26 09:44 wtmp
-rw-r--r--    1 root     root         4404 Nov 26 09:43 xdm-errors
-rw-------    1 root     root            0 Nov 26 09:43 xferlog

Quote:> ps aux

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2  1384   76 ?        S    09:21   0:04 init [5]
root         2  0.0  0.0     0    0 ?        SW   09:21   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SW   09:21   0:00 [kapm-idled]
root         4  0.0  0.0     0    0 ?        SWN  09:21   0:00 [ksoftirqd_CPU0]
root         5  0.0  0.0     0    0 ?        SW   09:21   0:00 [kswapd]
root         6  0.0  0.0     0    0 ?        SW   09:21   0:00 [kreclaimd]
root         7  0.0  0.0     0    0 ?        SW   09:21   0:00 [bdflush]
root         8  0.0  0.0     0    0 ?        SW   09:21   0:00 [kupdated]
root         9  0.0  0.0     0    0 ?        SW<  09:21   0:00 [mdrecoveryd]
root        13  0.0  0.0     0    0 ?        SW   09:22   0:01 [kjournald]
root       570  0.0  0.0   432    0 ?        SW   09:23   0:00 /sbin/dhcpcd -h c
root       732  0.0  0.5  1444  156 ?        S    09:23   0:00 syslogd -m 0
root       738  0.0  0.5  2036  172 ?        S    09:23   0:01 klogd -2
rpc        758  0.0  0.0  1528    0 ?        SW   09:23   0:00 portmap
rpcuser    786  0.0  0.0  1576    0 ?        SW   09:23   0:00 rpc.statd
root       898  0.0  0.0  1368    0 ?        SW   09:23   0:00 /usr/sbin/apmd -p
root       987  0.0  1.6  2244  488 ?        S    09:23   0:00 xinetd -stayalive
lp        1011  0.0  1.0  2548  304 ?        S    09:23   0:00 lpd Waiting
root      1030  0.0  1.5  1712  452 ?        S    09:23   0:00 /usr/sbin/dhcpd e
root      1076  0.0  0.0  1412    0 ?        SW   09:24   0:00 gpm -t ps/2 -m /d
root      1099  0.1  8.6 46204 2612 ?        S    09:24   0:07 /usr/sbin/httpd -
root      1117  0.0  0.6  1568  192 ?        S    09:24   0:00 crond
xfs       1167  0.0  4.7  4692 1436 ?        S    09:24   0:01 xfs -droppriv -da
root      1185  0.0  0.0  3240    0 ?        SW   09:24   0:00 smbd -D -o
root      1190  0.0  2.1  2416  640 ?        S    09:24   0:00 nmbd -D -o
root      1193  0.0  0.0  2364    0 ?        SW   09:24   0:00 nmbd -D -o
daemon    1227  0.0  0.1  1416   48 ?        S    09:24   0:00 /usr/sbin/atd
root      1234  0.0  0.0  1356    0 tty1     SW   09:24   0:00 /sbin/mingetty tt
apache    1252  0.0  6.7 46252 2036 ?        S    09:24   0:00 /usr/sbin/httpd -
 
 
 

1. win98 & win2k => RedHat7.1 & win2k, newbie need advise

Hi, I now have one hard drive in two partitions
with win98 on C: and win2000 on D:  and i want to
install redhat 7.1 and get rid of win98, what is the
best way to do this?

(I suppose i cannot just format C: (because win2k
  boot manager has something in it, right?) should i
  delete everything that has to do with win98 on C:
  and then make another partition for linux?)

Thanks in advance /Jens

2. D-Link530, "make" 1st step??

3. Help analyzing log file /var/log/messages on RH 5.1

4. Limiting the Network bandwidth by software

5. tcpd & identd usage...Need Advise

6. Moving from md5 to DES... ?

7. RH Linux: Bizarre wtmp/utmp, log file, and file date problems

8. idraw uses lots of CPU even when 'idle'

9. WWW Server: log file entries - Hack???

10. Has anyone hacked ftpd to keep a log of outgoing files?

11. Ramdisk & Floppy Error.. Help needed...

12. *NEED HELP* Get the inetd & in.rshd run on a RAMDISK at boot time?

13. HELP!: Netscape 3.0 & Virtual Servers & Log Files