Hi,
I have a little question about memory usage...
When I do a free, I get:
total used free shared buffers cached Mem: 18482800 18030668 452132 0 683068 9426792 -/+ buffers/cache: 7920808 10561992
But, when I do a ps, mysql is the only process that takes noticable memory; and it is far from 7.9GBs...
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 _ /usr/libexec/mysqld --basedir=/usr --datadir=/IOL/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/IOL/mysql/mysql.sock
Once you removed the buffers and the cached memory from the total used memory... what is left? Looks like I have "something" (that is not buffers/cached) that takes more than 4GB... Could it be disk cache or is it included in the cached value? Any idea?
Thx, JD
John Doe wrote:
Hi,
I have a little question about memory usage...
When I do a free, I get:
I calculate system memory usage by (total memory) - (free memory) - (cached memory) - (buffers memory)
The "free" memory reported by free/top/other tools is very misleading, and is the topic of many questions over the years because of it.
nate
I am just wondering how other people are doing their user management for multiple servers that not in any type of directory.
Do anyone use any application that query each server for users or keep a database of users that's on each server?
I would like to get feedback on what others use...
Thanks Justin
Justin Lim wrote:
I am just wondering how other people are doing their user management for multiple servers that not in any type of directory.
Do anyone use any application that query each server for users or keep a database of users that's on each server?
I would like to get feedback on what others use...
For my ~400 systems I use a custom script setup that I wrote and tie it into cfengine. Basically it generates dynamic passwd/shadow/group files for several different 'classes' of systems. Very few accounts have passwords, 99%+ of logins are done via ssh key based authentication which is managed by another script which dynamically creates ssh authorized_keys files for at least the shared accounts. Key files for both shared accounts and user accounts are managed by cfengine and populated by me. Key files and passwd/shadow/group files are inspected hourly and replaced if they were somehow changed from the master.
The person who was in my role before me tried to setup LDAP and it didn't work out too well. I learned at a while back that in this type of environment anyways LDAP is just another layer, and remains complicated even today(I've been managing LDAP systems off and on for about 8 years now).
The system I use today I wrote a couple of years ago and has proven to be very robust and reliable since each & every server has everything it needs to authenticate users. Both scripts show me detailed information of the changes I make before they are committed, and make automatic backups for easy rollback.
Home directories on some internal servers are centrally hosed by an NFS cluster, though most home directories are just skeletons that are not shared/replicated in any way. CFengine automatically creates home directories that do not exist by means of another script a co-worker of mine wrote a few years ago.
There's very few services other than ssh that we need authentication for, those typically have their own user databases.
nate
On Jul 6, 2009, at 12:15 PM, "Justin Lim" jlim@sullung.com wrote:
I am just wondering how other people are doing their user management for multiple servers that not in any type of directory.
Do anyone use any application that query each server for users or keep a database of users that's on each server?
I would like to get feedback on what others use...
I use active directory since I am platform agnostic.
If you want directory service quick 'n dirty go with NIS+Kerberos, then you can look at LDAP as an addition or replacement for NIS later after things are working.
NIS will allow anyone on the network to query it, so don't put passwords in it, just usernames, full name, uid/gid, home, shell. Create Kerberos principals for each user and for each computer and each computer/service (that supports Kerberos SSO that is). Then use pam_krb5 for authentication while adding NIS support in nsswitch.
You can migrate the users to LDAP later if need be.
-Ross
On Monday 06 July 2009, John Doe wrote:
Hi,
I have a little question about memory usage...
When I do a free, I get:
/proc/meminfo may give you a more detailed summary.
/Peter
total used free shared buffers cached
Mem: 18482800 18030668 452132 0 683068 9426792 -/+ buffers/cache: 7920808 10561992
But, when I do a ps, mysql is the only process that takes noticable memory; and it is far from 7.9GBs...
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 _ /usr/libexec/mysqld --basedir=/usr --datadir=/IOL/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/IOL/mysql/mysql.sock
Once you removed the buffers and the cached memory from the total used memory... what is left? Looks like I have "something" (that is not buffers/cached) that takes more than 4GB... Could it be disk cache or is it included in the cached value? Any idea?
Thx, JD
I'm attempting to create a script that will indicate the % utilization of a network interface. I need this to export a one shot output that can be called by nagios.
I've tried the following tools but I was unable to find a way to output just the utilization, and just one time: bmon, iftop, ifstat, bwm, dstat, rrdtool, iptraf.
Any ideas?
Thanks, Scott
I'm attempting to create a script that will indicate the % utilization of a network interface. I need this to export a one shot output that can be called by nagios.
I've tried the following tools but I was unable to find a way to output just the utilization, and just one time: bmon, iftop, ifstat, bwm, dstat, rrdtool, iptraf.
ntop ?
Parsons, Scott wrote:
I'm attempting to create a script that will indicate the % utilization of a network interface. I need this to export a one shot output that can be called by nagios.
I've tried the following tools but I was unable to find a way to output just the utilization, and just one time: bmon, iftop, ifstat, bwm, dstat, rrdtool, iptraf.
Get the interface counters for the interface, sleep 5 seconds(or more), get them again, calculate the difference taking into account interface speed and you can determine the % utilization that way.
I use SNMP and use these OIDs:
.1.3.6.1.2.1.2.2.1.10.2 = IF-MIB::ifInOctets.2 .1.3.6.1.2.1.2.2.1.16.2 = IF-MIB::ifOutOctets.2 .1.3.6.1.2.1.2.2.1.10.3 = IF-MIB::ifInOctets.3 .1.3.6.1.2.1.2.2.1.16.3 = IF-MIB::ifOutOctets.3
nate
From: "Parsons, Scott" sparsons@gsihosting.com
I'm attempting to create a script that will indicate the % utilization of a network interface. I need this to export a one shot output that can be called by nagios. I've tried the following tools but I was unable to find a way to output just the utilization, and just one time: bmon, iftop, ifstat, bwm, dstat, rrdtool, iptraf.
Made mine by reading /proc/net/dev and comparing with the values of the previous check saved in a tmp file... basicaly: ( value - previousvalue ) / time
If you do, watch out for tricky values (each 3 lines are 3 consecutive nagios checks, and the middle lines bug): No idea why they happen (maybe network driver bug?).
# null value: # eth1:406480423 4248723190 0 0 0 0 0 0 3936994849 1479449504 0 0 0 0 0 0 # eth1: 0 3869683986 12714 0 0 12714 0 29853042 407203012 1509323306 0 0 0 0 0 0 # eth1:407977803 4248736776 0 0 0 0 0 0 3956304636 1479465887 0 0 0 0 0 0
# false cycled value: # eth1:1616399669 4273106787 0 0 0 0 0 17 1680717193 1514316105 0 0 0 0 0 0 # eth1: 68966782 1661804061 13218 0 0 13218 0 30344226 1618715737 1544705181 17 0 0 0 17 0 # eth1:1621560785 4273138758 0 0 0 0 0 17 1735041823 1514359042 0 0 0 0 0 0
# Mega value (32bits=4294967296 max, 64bits=18446744073709551616 max???): # Did not find an easy way to handle 64 bits exceptions... # So check if bp is realistic (< 100Mb/s on eth1 and 1Gb/s on eth0). # eth0:1547646696449 8147061470 0 930 0 0 0 6 4113045092950 8164215117 0 0 0 0 0 0 # eth0:16615907842663613929 8145771274 0 930 0 0 0 8164237729 17763115100 8165567515 16937 0 0 0 16937 0 # eth0:1547659651868 8147140907 0 930 0 0 0 6 4113088607337 8164294628 0 0 0 0 0 0
JD
From: Peter Kjellstrom cap@nsc.liu.se
On Monday 06 July 2009, John Doe wrote:
When I do a free, I get: total used free shared buffers cached Mem: 18482800 18030668 452132 0 683068 9426792 -/+ buffers/cache: 7920808 10561992 But, when I do a ps, mysql is the only process that takes noticable memory; and it is far from 7.9GBs... USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 _ Once you removed the buffers and the cached memory from the total used memory... what is left? Looks like I have "something" (that is not buffers/cached) that takes more than 4GB... Could it be disk cache or is it included in the cached value?
/proc/meminfo may give you a more detailed summary.
Sadly, not much more information in /proc/meminfo... Same values as in free, since free reads it. Basicaly, 7.9GB are apparently used, but the sum of the memory used by all the processes is around 3.5GB...
JD
try vmstat, see all the options in "man vmstat" it reads from /proc/meminfo and /proc/stat #vmstat -a 5 -S m on my system with 2 GB ram it shows that i'm having 18 mb free, 922 mb inactive and 821 mb active my running processes only use a tiny bit of my active ram, you can check it with: #ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr
This is normal behavior, for better understanding please read this excellent article from redhat: http://www.redhat.com/magazine/001nov04/features/vm/
Sander
John Doe wrote:
From: Peter Kjellstrom cap@nsc.liu.se
On Monday 06 July 2009, John Doe wrote:
When I do a free, I get: total used free shared buffers cached Mem: 18482800 18030668 452132 0 683068 9426792 -/+ buffers/cache: 7920808 10561992 But, when I do a ps, mysql is the only process that takes noticable memory; and it is far from 7.9GBs... USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 _ Once you removed the buffers and the cached memory from the total used memory... what is left? Looks like I have "something" (that is not buffers/cached) that takes more than 4GB... Could it be disk cache or is it included in the cached value?
/proc/meminfo may give you a more detailed summary.
Sadly, not much more information in /proc/meminfo... Same values as in free, since free reads it. Basicaly, 7.9GB are apparently used, but the sum of the memory used by all the processes is around 3.5GB...
JD
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos