LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2013, 11:40 PM   #1
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Rep: Reputation: Disabled
Checking Memory


Привет!

I am working on a company server and need to check the total memory of the server. I looked at the "free -m" command but this doesn't seem correct.

For instance I know that my server has memory usage of 929GB, with a total available 1.00 Terabyte allowed.

yet when I type "free -m" the results do not reflect this.

How do I check the left over memory?
 
Old 11-30-2013, 11:44 PM   #2
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Well the free command should have all those things listed. Try without m switch and see if the numbers look ok. There would be serious caching on a machine like that so take buffers into consideration too.
 
Old 11-30-2013, 11:48 PM   #3
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Memory

Hello.

does it check the memory of the entire server, or just the directory I'm in?
 
Old 11-30-2013, 11:55 PM   #4
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Memory Info

I went into the /proc/meminfo file but I do not understand how to calculate the total memory.
 
Old 12-01-2013, 08:47 AM   #5
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
So are you talking about memory as in RAM or memory on a hard drive?

If you have a server with 1 tb ram, please consider getting some training either in house or through the it department. Machines like that really do require a properly qualified technician because they are normally critical systems and probably run into costing at least a few hundred thousand dollars.

If you are talking of disk space, use df instead of free.

Last edited by ericson007; 12-01-2013 at 09:00 AM.
 
Old 12-01-2013, 08:53 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
I'm sure arcolombo698 means hard drive, not RAM. So "free -m" is the wrong command. Try "df -m".
 
Old 12-01-2013, 12:44 PM   #7
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Yes I mean the memory that is stored. how do I understand the output from df -m ?
 
Old 12-01-2013, 12:51 PM   #8
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
what does the column head 1M blocks mean?
 
Old 12-01-2013, 12:52 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
instead of -m with df try -Th

it will look something like the following:

Code:
[ray@centos ~]$ df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4     50G  9.0G   38G  20% /
tmpfs        tmpfs    3.9G  4.0K  3.9G   1% /dev/shm
/dev/sdb1     ext4    485M  146M  315M  32% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  971G  720G  58% /exports/centos
/dev/sda1     ext4    1.4T  782G  524G  60% /exports/NFS_TV_Shows
/dev/sdc1     ext4    3.6T  1.4T  2.1T  41% /exports/New
tells you the device name, type, size, easy to read and understand.
 
Old 12-01-2013, 01:04 PM   #10
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
if my output for the bottom under DATA (/dev/md1) it says i have available 2.3T .. and used 85%. does this mean a file size of less than 2.3T (I am assuming this means terabyte???) will fit into this directory if I transferred it?

Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 99G 8.6G 85G 10% /
devtmpfs devtmpfs 16G 36K 16G 1% /dev
tmpfs tmpfs 16G 100K 16G 1% /dev/shm
tmpfs tmpfs 16G 908K 16G 1% /run
/dev/md0 ext4 99G 8.6G 85G 10% /
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs tmpfs 16G 908K 16G 1% /var/run
tmpfs tmpfs 16G 0 16G 0% /media
tmpfs tmpfs 16G 908K 16G 1% /var/lock
/dev/md1 ext4 15T 13T 2.3T 85% /data/
sshuser@hemonc01:~> man df
 
Old 12-01-2013, 01:10 PM   #11
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

But it doesn't make sense that if you add up all the "avail" columns, the amount of memory is too much. Assuming T is terabyte.

so in the example you gave

/dev/sdc1 ext4 3.6T 1.4T 2.1T 41% /exports/New

this means that 41% is used, 3.6 Terabytes is the size, 1.4T is used, and 2.1T is available ?
 
Old 12-01-2013, 03:19 PM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by arcolombo698 View Post
But it doesn't make sense that if you add up all the "avail" columns, the amount of memory is too much. Assuming T is terabyte.
Too much compared to what?

That list contains lines that may be redundant and lines with storage that is speculative, so it very well could add up to more than really exists. You aren't supposed to add it up. You are just supposed to look at individual volumes.

But in your example, the individual volume you want to look at is almost certainly md1 and that is so much bigger than everything else that looking at it alone vs. combined with the rest is barely more than rounding error.

Is md1 bigger than you expected it to be?

Quote:
/dev/sdc1 ext4 3.6T 1.4T 2.1T 41% /exports/New

this means that 41% is used, 3.6 Terabytes is the size, 1.4T is used, and 2.1T is available ?
Correct.

Quote:
Originally Posted by arcolombo698 View Post
For instance I know that my server has memory usage of 929GB, with a total available 1.00 Terabyte allowed.
I assume that is a different machine than the one for which you provided df output in post #10, including md1 which is a total of 15T.

Last edited by johnsfine; 12-01-2013 at 03:23 PM.
 
Old 12-01-2013, 06:43 PM   #13
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Md1 normally refers to a raid device, so it may be very posiible that the size is correct because of all the physical drives in the volume. Each disk may have less but calculated as an array may be correct displaying that size
 
Old 12-01-2013, 11:48 PM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
First, drop all the tmpfs mounts - these are not real. They are using memory and only reflect the limits of what each mount is allowed. Unfortunately, since tmpfs is memory the "available" all overlap. As a side note, they allow a trivial DOS attack for any mount (such as /run) that contains user owned files to use up all of your main memory - and can cause system dead locks, or (more often) system failures due to running out of memory.

Normally, tmpfs (by default) is limited to 1/2 your physical memory. Based on your df listing reporting the available size as 16G implies that you have 64GB of main memory. So adding up all of the tmpfs mounts is not a proper interpretation (but it does point to the DOS possibility).

If this is a real server with multiple users, your system is extremely vulnerable. (It looks almost like a current Fedora base - which is a very insecure system overall, and strongly not recommended for servers - and anything that uses systemd is vulnerable to hangs at boot and shutdown, with services failing for unknown reasons...).
 
Old 12-02-2013, 02:17 AM   #15
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by arcolombo698 View Post
if my output for the bottom under DATA (/dev/md1) it says i have available 2.3T .. and used 85%. does this mean a file size of less than 2.3T (I am assuming this means terabyte???) will fit into this directory if I transferred it?
Yes. 2.3 Terabyte are free on /data, 13 TB are used, and the overall size of this filesystem is 15TB. The figures are only roughly correct since they are rounded for easier interpretation by humans.

Quote:
For instance I know that my server has memory usage of 929GB, with a total available 1.00 Terabyte allowed.
How do you know? This doesn't fit your df output below (in-memory filesystems removed).

Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/md0       ext4       99G  8.6G   85G  10% /
/dev/md1       ext4       15T   13T  2.3T  85% /data/
 
  


Reply

Tags
memory


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking memory in Linux balakodoth Linux - Newbie 2 01-05-2011 01:57 AM
[SOLVED] Checking amount of system memory yaplej Programming 2 11-08-2010 09:10 PM
Any memory leak checking tool? George2 Programming 2 06-21-2006 11:26 AM
Easy way of checking fro memory leaks ? qwijibow Programming 2 04-20-2005 06:45 PM
checking amount of free memory sanjith11 Linux - Software 6 05-13-2004 11:11 AM


All times are GMT -5. The time now is 01:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration