Results 1 to 10 of 22
I am new to linux and running a server, but I have set up my Apache and ftp server using Redhat Linux 9. The computer is not being used for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-21-2004 #1Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
Resource Use
I am new to linux and running a server, but I have set up my Apache and ftp server using Redhat Linux 9. The computer is not being used for much else.
I am using virtual hosting, running three different domain names through one IP, but traffic is very low -- I would never expect to have more than 10-20 visitors at a time, and normally only 1-2.
However, as I look at my system monitor, I am surprised by two things I see:
1) My memory use holds absolutley steady at 982 MB out of 1006 MB. (Swap file usage holds steady at 2.7MB out of 1.9 GB). I don't understand why. If I go to "process Listing" and sort by Memory, I see:
12.9 MB spamd -d -c -a
11.2 MB gnome-panel
11.0 MB nautilus
9.9 MB gnome system monitor
6.6 MB metacity
6.2 MB gconfd-2
6.0 MB notication-area-applet
5.2 MB httpd root
twelve different httpd processes each at about 8 MB
89.5 MB X
4.8 MB gnome-settings-daemon
4.7 MB magicdev
4.4 MB xfs
3.5 MB pam-panel-icon
3.4 MB jserver
2.3 MB ntpd
2.0 MB gdm-binary
8.0 MB gnome-session
2.0 MB cupsd
1.5 MB bonobo-activation-server
a few other things at less than 1 MB each
I don't get it -- this adds up to less than 200MB. Yet I am supposedly using up 982 MB. What am I missing here? Am I as close to slowdowns due to RAM as it appears?
2) A lesser issue, but I have two hard drives of 120 Gigs each. Yet, under devices I see:
/dev/hda1 /boot 9.1 MB used of 98.7 MB
/dev/hda2 / 5.6 GB of 109.9 GB
none /dev/shm 0 bytes of 503 MB used
It seems that this is only accounting for one of my two hard drives, yet, during installation and partitioning, I am pretty sure that it referred to both hard drives. Any explanation as to why I don't get a total of 240 Gigs, or thereabouts?
Thanks for any insights you can give me.
- 07-21-2004 #2Just Joined!
- Join Date
- Jul 2004
- Location
- MN USA
- Posts
- 70
Are you only running the servers? You can try to boot w/o the GUI, that should help some.
Also, concerning your devices. Lets try to look up this way...
(at least I think this will work.
Do command:
All ide h.d.'s you have in your system should appear in here, for example, mine looks like:Code:ls /proc/ide
Indicating I have hda and hdc.Code:# ls /proc/ide amd74xx drivers hda hdc ide0 ide1
- 07-21-2004 #3Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
Yes, I can see the existence of the hard drives here:
[beorn@www beorn]$ ls /proc/ide
drivers hda hdb hdd ide0 ide1 sis
But do I have the storage space available?
- 07-21-2004 #4Just Joined!
- Join Date
- Jul 2004
- Location
- MN USA
- Posts
- 70
You should be able to access the hard drives. But they need to be mounted first. They are not mounted right now and thats why you didn't see them in your device list. To find out whats mounted just type 'mount' and a list will appear of whats mounted.
A little more info on the drive you are trying to access:
Are there multiple (or any for that matter) partitions, if so, which ones do you want to access, all? what partitions and what filesystem(s) (e.g. NTFS, fat32, ext2, etc.) are on the drive? Or is there nothing at all and you want to create new and access?
Let me know!
- 07-21-2004 #5Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
[beorn@www beorn]$ mount
/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
[beorn@www beorn]$
Yes, I see what you mean. I had assumed all hard drives were automatiically mounted at startup, but I see I assumed wrong.
I allowed the system to partition automatically the total available space when installing Lunux. I think it was one partition for boot, one for swap files, and the rest all one big area.
- 07-21-2004 #6Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
This is my /etc/fstab file:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb1 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
Hard drive 2 is not listed, so of course it does not mount automatically at startup. Is this an indication that the second hard drive was never formatted and partitioned?
- 07-21-2004 #7Just Joined!
- Join Date
- Jul 2004
- Location
- MN USA
- Posts
- 70
Ok - lets try to mount your hdb.
First lets see whats there. Type:
then press the letter 'p' and enter, should get a list likeCode:fdisk /dev/hdb
]/dev/hdb1
/dev/hdb2
etc
Pay attention to filesystem type (fat32, ext3, etc.)
exit fdisk w/ q command
mkdir a directory to mount to (for this example I'll use a dir in the /mnt directory called other120gb) call the dir whatever you want, and place in wherever you want.
Try to mount, using dir above, and assuming there is only /dev/hdb1, something like this should work:
but you might have to change 'ext3' to whatever filesystem is on /dev/hdb1, or 2, or 3, etc.Code:mount -t ext3 -o rw /dev/hdb1 /mnt/other120gb
If this works, you can add the drive information to your fstab file, so the partition will mount on boot.
If this doesn't work maybe that drive is not partitioned or formated.
- 07-22-2004 #8Just Joined!
- Join Date
- Jul 2004
- Location
- MN USA
- Posts
- 70
Curious, it DOES show up in your fstab here:
Looks like your second HD is a swap space (thats alot of swap space!)Code:/dev/hdb1 swap swap defaults 0 0
do the fdisk and see if there is unallocated space or other partitions besides /dev/hdb1 - If not you might want to resize swap part to make room for storage.
- 07-22-2004 #9Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
Here's what I got:
[root@www root]# fdisk /dev/hdb
The number of cylinders for this disk is set to 14589.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hdb: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 254 2040223+ 82 Linux swap
So apparently it is the world's biggest swap file.
Can you advise on how to change this? Thanks!
- 07-22-2004 #10Just Joined!
- Join Date
- Jul 2004
- Posts
- 23
I re-partitioned hdb:
[root@www root]# fdisk -l
Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 14593 117113850 83 Linux
Disk /dev/hdb: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 2500 20081218+ 82 Linux swap
/dev/hdb2 2501 8000 44178750 83 Linux
/dev/hdb3 8001 14589 52926142+ 83 Linux
[root@www root]#
However, the system monitor does not yet show this under devices. (It now still shows 1.9 GB of swap space.)
I assume that the next step is to alter my etc/fstab file???
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb1 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
Any advice on how to do this properly would be appreciated.
Also -- VERY WEIRD -- memory use has fallen off to a steady 245 MB of of 1006MB. I had rebooted my computer many times without any effect, but rebooting after limiting the swap file to a reasonable portion of the hdb brought it down. How can this be?


Reply With Quote
