The /proc File System And ProcMeter
Most people are using /proc without realizing it. The programs top, ps, free and their friends all use /proc. The information that they provide is taken directly from /proc and formatted for display.
Compare the contents of the /proc/meminfo file (above) with the command free that gives output that looks like:
total used free shared buffers Mem: 11156 8680 2476 2724 2800 Swap: 25196 5204 19992
As you can see, this table is just a formatted version of the contents of /proc/meminfo.
The output of the ps program is all available in /proc; all of the information is stored in the per-process directories. Most of it just needs to be reasonably formatted for the user.
ProcMeter is a program that monitors the information stored in /proc. The information is displayed in a number of graphs. Each of these graphs shows one aspect of the system. The program runs under X Windows on Linux only.
Anybody who has used xload, xmeter or perfmeter will recognize this description. The difference is these programs use a system-independent method of obtaining data, whereas ProcMeter was designed for Linux from the start. When ProcMeter is using /proc, it is occupying minimal memory and taking negligible CPU time. Once /proc is used, other ideas for obtaining data spring to mind. Looking at the table of /proc above, we can see there is a lot of useful information available.
The statistics available in ProcMeter can be divided naturally into a number of classes.
Processes—Basic information about the system, how busy it is and how heavily loaded it is. The processing power of the CPU is spread between all of the running processes and the kernel, and is idle for the remaining time.
is the total percentage of the CPU being used.
is the percentage of the CPU used by user processes.
is the percentage of the CPU used by nice (low priority) processes.
is the percentage of the CPU used by the kernel.
is the percentage of the CPU unused (opposite of CPU).
is the system load, the number of running processes averaged over the previous minute.
is the number of processes present on the system.
is the number of context switches between processes per second.
Memory (Real and Virtual)--Memory is such a precious resource (especially on small PCs for the home user) that it is important to keep track of it. The beauty of the Unix system is that the use of virtual memory (swap space) is transparent. Transparent, that is, until your computer makes a noise like a coffee grinder, and programs start to crawl—this is a sure sign that you are out of real memory and living in the virtual stuff.
is the amount of free RAM.
is the amount of used RAM.
is the amount of RAM used for file buffers.
is the amount of RAM used as cache memory (kernel version 2.0).
is the amount of swap space on disk being used (the shortfall in RAM).
is the amount of swapping (the sum of swap-in and swap-out).
is the number of pages of memory swapped in from disk per second.
is the number of pages of memory swapped out to disk per second.
Hardware—The hardware the operating system runs on is often a bottleneck in performance. Every interrupt that is generated by hardware must be processed by the kernel. The disk drive, another slow device, must also be controlled.
is the amount of paging (the sum of page-in and page-out).
is the number of pages of memory read in from disk per second.
is the number of pages of memory written out to disk per second.
is the number of disk accesses per second.
is the number of interrupts (IRQs) per second.
Network—When running on a network, there can be a quite an impact on system performance due to handling the traffic. Each packet that arrives must be handled promptly, causing hardware interrupts and kernel CPU usage.
is the number of packets on local interfaces (same machine).
is the total number of packets on fast network devices.
is the number of received packets on fast network devices.
is the number of transmitted packets on fast network devices.
is the total number of packets on slow network devices.
is the number of received packets on slow network devices.
is the number of transmitted packets on slow network devices.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Stunnel Security for Oracle
- SourceClear Open
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide