From finding out bottleneck in storage to CPU to memory and network, these commands are a must know for Linux monitoring.
Thursday, September 05, 2013: Other than the add-on tools that can help the administrators manage their Linux server performance, we bring to you some built-in commands that can help you with information about system activities. These tools can be used to find possible causes of a performance glitch. The commands mentioned below are some of the most basic commands in system analysis and debugging server issues. Have a look:
1. top (display Linux tasks )
The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. The types of system summary information shown and the types, order and size of information displayed for tasks are all user configurable and that configuration can be made persistent across restarts.
The program provides a limited interactive interface for process manipulation as well as a much more extensive interface for personal configuration -- encompassing every aspect of its operation. And while top is referred to throughout this document, you are free to name the program anything you wish. That new name, possibly an alias, will then be reflected on top's display and used when reading and writing a configuration file.
Common hot keys:
t Displays summary information off and on.
m Displays memory information off and on.
A Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.
f Enters an interactive configuration screen for top. Helpful for setting up top for a specific task.
o Enables you to interactively select the ordering within top.
r Issues renice command.
k Issues kill command.
z Turn on or off color/mono
2. vmstat (Report virtual memory statistics )
vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.
-f switch displays the number of forks since boot. This includes the fork, vfork, and clone system calls, and is equivalent to the total number of tasks created. Each process is represented by one or more tasks, depending on thread usage. This display does not repeat.
-m displays slabinfo.
-n switch causes the header to be displayed only once rather than periodically.
-s displays a table of various event counters and memory statistics. This display does not repeat.
3. w (Show who is logged on and what they are doing)
w displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
The following entries are displayed for each user: login name, the tty name, the remote host, login time, idle time, JCPU, PCPU, and the command line of their current process.
The JCPU time is the time used by all processes attached to the tty. It does not include past background jobs, but does include currently running background jobs.
-h Don't print the header.
-u Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a "su" and do a "w" and a "w -u".
-s Use the short format. Don't print the login time, JCPU or PCPU times.
-f Toggle printing the from (remote hostname) field. The default as released is for the from field to not be printed, although your system administrator or distribution maintainer may have compiled a version in which the from field is shown by default.
-V Display version information.
-o Old style output. Prints blank space for idle times less than one minute.
user Show information about the specified user only.
4. uptime (Tell How Long The System Has Been Running)
uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
5. ps (Report a snapshot of the current processes. )
ps command will report a snapshot of the current processes. To select all processes use the -A or -e option.
To see every process on the system using standard syntax:
$ ps -e
$ ps -ef
$ ps -eF
$ ps -ely
To see every process on the system using BSD syntax:
$ ps ax
$ ps axu
To print a process tree:
$ ps -ejH
$ ps axjf
To get info about threads:
$ ps -eLf
$ ps axms
To get security info:
$ ps -eo euser,ruser,suser,fuser,f,comm,label
$ ps axZ
$ ps -eM
To see every process running as root (real & effective ID) in user format:
$ ps -U root -u root u
To see every process with a user-defined format:
$ ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
$ ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
$ ps -eopid,tt,user,fname,tmout,f,wchan
Find Out The Top 10 Memory Consuming Process
$ ps -auxf | sort -nr -k 4 | head -10
Find Out top 10 CPU Consuming Process
$ ps -auxf | sort -nr -k 3 | head -10
6. free - (Display amount of free and used memory in the system )
free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The shared memory column should be ignored; it is obsolete.
-b Display the amount of memory in bytes.
-c count Display the result count times. Requires the -s option.
-g Display the amount of memory in gigabytes.
-k Display the amount of memory in kilobytes. This is the default.
-l Show detailed low and high memory statistics.
-m Display the amount of memory in megabytes.
-o Display the output in old format, the only difference being this option will disable the display of the "buffer adjusted" line.
-s Continuously display the result delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times.
-t Display a line showing the column totals.
-V Display version information.
7. mpstat (Report processors related statistics.
)
The mpstat command writes to standard output activities for each available processor, processor 0 being the first one. Global average activities among all processors are also reported. The mpstat command can be used both on SMP and UP machines, but in the latter, only global average activities will be printed. If no activity has been selected, then the default report is the CPU utilization report.
Use mpstat -P ALL to display average CPU utilization per processor.
8. iostat (Report Central Processing Unit (CPU) statistics and input/out‐put statistics for devices and partitions.)
The iostat command is used for monitoring system input/output device
loading by observing the time the devices are active in relation to
their average transfer rates. The iostat command generates reports that
can be used to change system configuration to better balance the
input/output load between physical disks.
Atithya Amaresh, EFYTIMES News Network
Fonte: 8 Helpful Linux System Monitoring Commands
Linux Tech Hacks
Your Linux tech hacks and Tips
7 Most Surprising Places You Will Find Linux!
Did you know that Linux milks cows, runs a motorcycle and makes coffee too?
Thursday, October 17, 2013: Open source and specifically Linux isn't all about license or a coding methodology, it has already begun to sprout up everywhere apart from just your computer systems and applications. Here's a compilation of some of the more surprising places you'll find your beloved operating system.
1. US Postal Service
Linux has gone postal. For the past decade, the US Postal Service has relied on a mail sorting system that uses Linux OS at its heart. And for those who really love Linux, there are some Linux themes stamps to decorate their mail which can be found at Zazzle.com.
2. Robots
Isamu is said to be the first humanoid Robot to run on Linux late in 2001. But since then, Linux has become a popular basis for all kinds of robots including Pleo, an animatronic dinosaur toy and the Katana Robotic Arm for industrial applications built by Neuronics.
3. The Linux motorcycle
Mavizen's TTX02 is billed as the first electronic racing motorcycle with an onboard-computer, USB ports and an IP address. This lets the crew tune the bike over a WLAN. It can hit speeds of 130 mph and it's all powered by a Linux system.
4. Coffee maker
This commercial coffee maker was on display at Embedded World in Nurmberg, Germany. It runs on Linux and was built with the Qt framework. It's not available for consumers, but a few years ago a Linux lover published instructions for building your own Linux coffee pot. We say cheers to Penguin-inspired Java.
5. Linux milks the cow
Farm equipment manufacturer, DeLaval made a robotic milking machine that not only runs on Linux (and Windows), but lets the farmer operate it via a wireless, remote control. Now that's what we call milking a free OS.
6. Security Cameras
Linux backs the Zone Minder's home video camera surveillance system. ZoneMinder is an integrated set of applications for surveillance, capture, recording of any CCTV or security camera attached to a Linux-based machine. There is no limit to the number of cameras the app can support, beyond what your Linux machine can handle.
7. Traffic Lights
Next time you're stopped at a traffic light, take a moment to think geek...or rather Peek. Peek Traffic makes a series of Linux-based traffic lights that keeps traffic flowing in places like Iowa, New York and on the 101 in L.A.
Courtesy: CIO
Fonte: 7 Most Surprising Places You Will Find Linux!
Choosing The Right Linux Distro!
Thinking which Linux distro to choose? Here's a guide to choose between 10 niche Linux distros.
1. Debian:
Who Should Choose: Those who need stability as it uses older software which is known to be stable.
Suitable for: Servers
Recommended system requirements: 1GHz processor, 512MB memory, 5GB hard-drive
Website: http://www.debian.org/distrib/
2. Ubuntu
Who Should Choose: Those want the latest software and an interface with better graphics.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 800MB memory, 1GHz processor, and 5GB hard-drive
Website: http://www.ubuntu.com/download
3. Kubuntu
Who Should Choose: Those want the latest software and an interface with better graphics but dislikes unity.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 1GHz processor, 10GB hard-drive, and more than 1GB memory
Website: http://www.kubuntu.org/getkubuntu
4. Xubuntu
Who Should Choose: Lightweight version of Ubuntu. Those want the latest software and an interface with better graphics but for older hardware or hardware with less resources.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 512MB memory and 5GB hard-drive
Website: http://xubuntu.org/getxubuntu/
5. Linux Mint
Who Should Choose: want a Debian-based system, but dislike Unity may be interested in Linux Mint. Comes with choice of interface i.e. MATE, Cinnamon, XFCE, or KDE.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 1GHz processor, 1GB memory, and 10GB hard-drive
Website: http://www.linuxmint.com/download.php
6. Kali
Who Should Choose: Hackers or security experts.
Suitable for: Average mainstream desktop/laptop user
Website: http://www.kali.org/downloads/
7. Slackware
Who Should Choose: advanced users who want light weight system.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: i486 processor, 256MB memory, and 5GB hard-drive
8. Fedora
Who Should Choose: Who want RedHat counterpart of Ubuntu (Debian system). Suitable for: Mainstream desktop/laptop users.
Recommended system requirements are 1GB memory and 10GB hard-drive.
Website: http://fedoraproject.org/en/get-fedora
9. Red Hat Enterprise Linux
Who Should Choose: Who want paid servery system.
Suitable for: Server system
10. Puppy Linux
Who Should Use: Those with lightweight system
Suitable for: Older systems
Recommended system requirements: 333MHz processor, 64MB memory, 512MB swap, and 1GB hard-drive.
Website: http://puppylinux.org/main/Download Latest Release.htm
Atithya Amaresh, EFYTIMES News Network
Fonte: Choosing The Right Linux Distro!
|
1. Debian:
Who Should Choose: Those who need stability as it uses older software which is known to be stable.
Suitable for: Servers
Recommended system requirements: 1GHz processor, 512MB memory, 5GB hard-drive
Website: http://www.debian.org/distrib/
2. Ubuntu
Who Should Choose: Those want the latest software and an interface with better graphics.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 800MB memory, 1GHz processor, and 5GB hard-drive
Website: http://www.ubuntu.com/download
3. Kubuntu
Who Should Choose: Those want the latest software and an interface with better graphics but dislikes unity.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 1GHz processor, 10GB hard-drive, and more than 1GB memory
Website: http://www.kubuntu.org/getkubuntu
4. Xubuntu
Who Should Choose: Lightweight version of Ubuntu. Those want the latest software and an interface with better graphics but for older hardware or hardware with less resources.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 512MB memory and 5GB hard-drive
Website: http://xubuntu.org/getxubuntu/
5. Linux Mint
Who Should Choose: want a Debian-based system, but dislike Unity may be interested in Linux Mint. Comes with choice of interface i.e. MATE, Cinnamon, XFCE, or KDE.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: 1GHz processor, 1GB memory, and 10GB hard-drive
Website: http://www.linuxmint.com/download.php
6. Kali
Who Should Choose: Hackers or security experts.
Suitable for: Average mainstream desktop/laptop user
Website: http://www.kali.org/downloads/
7. Slackware
Who Should Choose: advanced users who want light weight system.
Suitable for: Average mainstream desktop/laptop user
Recommended system requirements: i486 processor, 256MB memory, and 5GB hard-drive
8. Fedora
Who Should Choose: Who want RedHat counterpart of Ubuntu (Debian system). Suitable for: Mainstream desktop/laptop users.
Recommended system requirements are 1GB memory and 10GB hard-drive.
Website: http://fedoraproject.org/en/get-fedora
9. Red Hat Enterprise Linux
Who Should Choose: Who want paid servery system.
Suitable for: Server system
10. Puppy Linux
Who Should Use: Those with lightweight system
Suitable for: Older systems
Recommended system requirements: 333MHz processor, 64MB memory, 512MB swap, and 1GB hard-drive.
Website: http://puppylinux.org/main/Download Latest Release.htm
Atithya Amaresh, EFYTIMES News Network
Fonte: Choosing The Right Linux Distro!
Assinar:
Postagens (Atom)
Marcadores
10 Coisas e mais que o 'apt' pode te ajudar!
(1)
16 Ferramentas Poderosas Para Usuários Linux
(1)
25 melhores aplicativos para Linux
(1)
Alguns Comandos Para conseguir Informacao do Sistema em Linux
(1)
Comandos engraçados que voce talvez possa NÃO conhecer!
(1)
Linux se tornará uma força majoritária em jogos
(1)
Por Que a Valve Quer Portar 2500 Jogos Para Linux?
(1)
Steam Box da Valve rodará Linux
(1)
Um pouco sobre o Nmap 6.0
(1)
Você usa sudo? aprenda o básico
(1)
init system
(1)
launchd
(1)
macosx
(1)
smf
(1)
solaris
(1)
systemd
(1)