Friday 24 June 2011

syslog in linux/redhat

File is in /etc/syslog.conf

by default:
*.info;mail.none;authrpiv.none;cron.none /var/log/messages


meaning logging all subject at info (and above) level but the mail and cron not.
to the messages file

To make it particular:
kern.=info (only kernel with level info)

Numerical Code Severity Reference
-------------- ------------------------------------------- ---------
0 Emergency: system is unusable [RFC3164]
1 Alert: action must be taken immediately [RFC3164]
2 Critical: critical conditions [RFC3164]
3 Error: error conditions [RFC3164]
4 Warning: warning conditions [RFC3164]
5 Notice: normal but significant condition [RFC3164]
6 Informational: informational messages [RFC3164]
7 Debug: debug-level messages [RFC3164]


7 is the most detail severity level.

Tuesday 21 June 2011

Explanation free Command in Linux

total Used free shared buffers cached
Mem: 49415736 49139132 276604 0 5656 47368280
-/+ buffers/cache: 1765196 7650540
Swap: 5237180 20 5237160

Mem total : Mem used + free
Mem used : 49GB (ps + buffers 5656 + cache 47GB)


- buffer/cache : Mem used - (buffers 5656 + cache 47GB)
+ buffer/cache : Mem free + (buffers 5656 + cache 47GB)

Swap (paging/Hard disk) used is 20KB only.



Buffers and cache are considered low priority, they r using large mem when none uses it. when apps using it, they will be decreased.

Buffers is for remembering the FS like dir structure (ls -R . will boost the buffr)
cache is storing the file content, so processes can access file in cache instead read it over and over from the disk.