<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7758508046427235624</id><updated>2012-02-16T18:27:29.311-08:00</updated><category term='Windows XP'/><category term='Windows 2003'/><category term='exportfs'/><category term='Application server'/><category term='device'/><category term='fibre channel'/><category term='status'/><category term='gigabytes/sec'/><category term='io stack'/><category term='storage'/><category term='multipathing driver'/><category term='method'/><category term='Windows'/><category term='sar'/><category term='hba'/><category term='latency'/><category term='Oracle'/><category term='db2'/><category term='query'/><category term='iostat'/><category term='array'/><category term='restore'/><category term='drop'/><category term='RedHat'/><category term='commands'/><category term='ibm'/><category term='io operations per second'/><category term='slow response time'/><category term='websphere'/><category term='monitor'/><category term='umount'/><category term='tuning'/><category term='automate'/><category term='top'/><category term='ora-12705'/><category term='performance'/><category term='nfs'/><category term='web server'/><category term='scsi'/><category term='troubleshoot'/><category term='cpu'/><category term='backup'/><category term='linux'/><category term='disk io'/><category term='fc'/><category term='transaction'/><category term='OLAP'/><category term='http server'/><category term='optimize'/><category term='mount'/><category term='startup'/><category term='aix'/><category term='definition'/><category term='files'/><category term='df'/><category term='io requests'/><category term='memory'/><category term='lv'/><category term='instance'/><category term='db2icrt'/><category term='transaction system'/><category term='tar'/><category term='lspv'/><category term='disks'/><category term='bandwidth'/><category term='gigabit'/><category term='iops'/><category term='directories'/><category term='terms'/><category term='SUSE'/><category term='hdisk'/><category term='stats'/><category term='busy'/><category term='remote desktop'/><category term='network'/><category term='throughput'/><category term='statistics'/><category term='re-create'/><category term='traffic'/><category term='MB/s'/><category term='vmstat'/><title type='text'>No Bottlenecks</title><subtitle type='html'>your app is too slow, now what?</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2529452270500530073</id><published>2009-03-02T22:45:00.000-08:00</published><updated>2009-03-02T22:52:37.838-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db2'/><title type='text'>5 Simple Commands to Remove DB2 Cleanly</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Before you install new version of DB2, if you need to remove the old version, please perform the following steps:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;   1.&lt;/span&gt; &lt;span style="font-family: trebuchet ms;"&gt;Log in as root.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;   2.&lt;/span&gt; &lt;span style="font-family: trebuchet ms;"&gt;List all DB2 instances:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;      &lt;span style="font-family: courier new;"&gt;bash# /&lt;db2&gt;/instance/db2ilist&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;   3.&lt;/span&gt; &lt;span style="font-family: trebuchet ms;"&gt;Drop each instance listed in the previous step with the following command:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      bash# /&lt;db2&gt;/instance/db2idrop instance-name&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;   4.&lt;/span&gt; &lt;span style="font-family: trebuchet ms;"&gt;Drop the DB2 administration server:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;      bash# /&lt;db2&gt;/instance/dasidrop `/&lt;db2&gt;/instance/dasilist`&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;   5.&lt;/span&gt; &lt;span style="font-family: trebuchet ms;"&gt;Uninstall all of the DB2 packages on your system using the db2deinstall command on your DB2 CD-ROM or from the unpackaged directory:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      bash# /mnt/cdrom/db2/db2_deinstall -n&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Actual example:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;staff1@pw70:/opt/IBM/db2/V9.5/instance&gt;./db2idrop db2inst1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DBI1070I  Program db2idrop completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;staff1@pw70:/opt/IBM/db2/V9.5/instance&gt;./db2idrop db2ins91&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DBI1070I  Program db2idrop completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;staff1@pw70:/opt/IBM/db2/V9.5/instance&gt;daslist&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;dasusr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;staff1@pw70:/opt/IBM/db2/V9.5/instance&gt;dasdrop dasusr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;SQL4410W  The DB2 Administration Server is not active.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DBI1070I  Program dasdrop completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;staff1@pw70:/data/software/db2v953a/server&gt;./db2_deinstall -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Enter full path name for the install directory -&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/opt/IBM/db2/V9.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DBI1016I  Program db2_deinstall is performing uninstallation. Please&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      wait.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;The execution completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;.pw.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2529452270500530073?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2529452270500530073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/03/5-simple-commands-to-remove-db2-cleanly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2529452270500530073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2529452270500530073'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/03/5-simple-commands-to-remove-db2-cleanly.html' title='5 Simple Commands to Remove DB2 Cleanly'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-7689260211130837771</id><published>2009-02-07T15:59:00.000-08:00</published><updated>2009-02-07T16:00:29.430-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='remote desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><title type='text'>How to kill hanging Windows remote desktop connection</title><content type='html'>&lt;pre&gt;When you don't log off Windows Remote Desktop (or terminal service client), the connection becomes&lt;br /&gt;orphaned. You may get the following screen:&lt;br /&gt;&lt;img src="http://www.performancewiki.com/img/mstsc-exceed-456x114.gif" width="456" height="114" /&gt;&lt;br /&gt;Too many sessions prevents future logins.  Do the following to clean up connections (on Windows 2003 server).&lt;br /&gt;From a client machines CMD windows:&lt;br /&gt;&lt;br /&gt;D:&gt;query session /SERVER:myserver.myco.com&lt;br /&gt;SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE&lt;br /&gt;console                                     0  Conn    wdcon&lt;br /&gt;rdp-tcp                                 65536  Listen  rdpwd&lt;br /&gt;rdp-tcp#11        Administrator             1  Active  rdpwd&lt;br /&gt;rdp-tcp#4         Administrator             2  Active  rdpwd&lt;br /&gt;&lt;br /&gt;The above show 2 connections to “myserver”. You can kill the sessions with ID 1, 2, 3, so on.&lt;br /&gt;&lt;br /&gt;tsdiscon 1 /SERVER:myserver.myco.com&lt;br /&gt;&lt;br /&gt;where 1  rdp-tcp#11        Administrator             1  Active  rdpwd “ID” col&lt;br /&gt;Also, can tskill to remotely stop a process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-7689260211130837771?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/7689260211130837771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-kill-hanging-windows-remote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7689260211130837771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7689260211130837771'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-kill-hanging-windows-remote.html' title='How to kill hanging Windows remote desktop connection'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-1493129777025373165</id><published>2009-02-07T15:48:00.000-08:00</published><updated>2009-02-07T15:58:20.707-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='automate'/><title type='text'>Scheduling Linux Tasks</title><content type='html'>automation and scheduling:&lt;br /&gt;&lt;br /&gt;The at command enables the simplest form of job scheduling. It runs a command or a series of commands once only at a specified time, and mails any output to the user. The jobs it runs are processed in the background.  You use this syntax for the at command. In the syntax, you can specify the time in a number of different ways. For example, you can specify the time as 01:30 or as 1:30 am.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[root@host11 pwstaff]# at -m 01:30&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You now want to schedule a series of commands that you’ve saved in a file named “system_maintenance” to run at 12:00 pm. To do this, you use the -f option to Specify the file in an at command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[root@host11 pwstaff]# at -f system_maintenance 12:00&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Suppose that it is the end of June and you want to schedule a job to run four weeks from today, without entering the exact date on which it must run.  Which command do you enter before specifying the job that must run to do this?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;at now + 4 weeks &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ordinary users use the crontab command to create or edit their crontab files. To use the crontab command, users must be listed in the file /etc/cron.allow. If that file doesn’t exist, the users must not be listed in /etc/cron.deny. If neither file exists, all users can use the crontab command unless some other configuration prevents this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[root@samwise root]# crontab -l&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;no crontab for root&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[root@samwise root]# crontab -e to create&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; An entry of 00 in the minute field, 20 in the hour field, and 1-5 in the day of week field specifies that a command must run at 8:00 pm every day, from Monday to Friday.&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;00 20 * * 1-5 sort/usr/sales&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order, the fields that make up the time pattern in a crontab file entry include minute, hour, day of month, month of year, and day of week.  Examples:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;0 22 * * 1-5                   10:00 pm on weekdays &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;15 14 1 * *                    2:15 pm on the first of every month&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;30 /2 * * *                    Half past the hour every two hours&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;30 19 * * 1                    7:30 pm every Monday&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The /etc/at.allow and /etc/at.deny files enable you to control which users can run the at command. When a user tries to run an at job, the at command checks to see if the /etc/at.allow file exists. If it does and the user is listed in the file, at schedules the job.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the user is not listed in /etc/at.allow, they will not be able to schedule the job, irrespective of whether they are listed in the /etc/at.deny file.If the /etc/at.allow file does not exist, at checks the /etc/at.deny file. If the user’s name does not appear in this file, the job will be scheduled. If the /etc/at.allow file doesn’t exist and /etc/at.deny is empty, any user can run at jobs. Alternatively, if /etc/at.allow exists and is empty, or if neither file exists, no user except root can run at jobs.&lt;br /&gt;&lt;br /&gt;In some Linux distributions, such as Red Hat 7, any user can run cron jobs if neither the /etc/cron.allow or /etc/cron.deny files exist. In other distributions, only root can run cron jobs if neither file exists.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-1493129777025373165?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/1493129777025373165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/scheduling-linux-tasks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1493129777025373165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1493129777025373165'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/scheduling-linux-tasks.html' title='Scheduling Linux Tasks'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-1943630328190771625</id><published>2009-02-05T18:04:00.000-08:00</published><updated>2009-02-05T18:05:55.344-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nfs'/><category scheme='http://www.blogger.com/atom/ns#' term='mount'/><category scheme='http://www.blogger.com/atom/ns#' term='exportfs'/><category scheme='http://www.blogger.com/atom/ns#' term='aix'/><title type='text'>How to export NFS share and mount it on a client (AIX)</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;bash-3.00# exportfs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;/data/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.com   &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;NOTE: the exported directory (e.g., /data/fs/fs1) must be a file system itself, not just any directory.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;In this case, /data/fs/fs1 is a file system itself, but /data is not. So if you export /data, when you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;mount it from client, it will not work (you will get an error).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;bash-3.00# exportfs -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;This commands exports (or freshes) the list again from the server. Man page for exportfs shows this:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Flags&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;       -a &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Exports all directories listed in the exports file.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;       -v &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Prints the name of each directory as it is exported or unexported.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;To verify what’s been exported, run:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;bash-3.00# exportfs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;/cesa/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;From client side, you can run showmount to list what’s exported:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;bash-3.00# showmount -a pw40&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;pw41.test.pw.com:/data/fs/fs1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Then you mount it to an existing directory (create it if it doesn’t exist yet):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;bash-3.00# mount pw40:/data/fs/fs1 /data/clientfs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;bash-3.00# cd /data/clientfs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;bash-3.00# ls&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;files&gt;&lt;/span&gt;&lt;/span&gt;  &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-1943630328190771625?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/1943630328190771625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-export-nfs-share-and-mount-it-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1943630328190771625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1943630328190771625'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-export-nfs-share-and-mount-it-on.html' title='How to export NFS share and mount it on a client (AIX)'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-6551116895449729073</id><published>2009-02-05T18:00:00.000-08:00</published><updated>2009-02-05T18:02:19.786-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db2icrt'/><category scheme='http://www.blogger.com/atom/ns#' term='drop'/><category scheme='http://www.blogger.com/atom/ns#' term='re-create'/><category scheme='http://www.blogger.com/atom/ns#' term='db2'/><category scheme='http://www.blogger.com/atom/ns#' term='instance'/><title type='text'>DB2 V9.1: How to Re-create a Instance</title><content type='html'>&lt;p&gt;Like the Nissan Pathfinder’s ad: “not that you would, but you could”. In certain performance test conditions, you may have to drop the current DB2 V8 instance, install V9.1, and re-create a instance. Here is a short list of helpful commands - run as root unless specifically sudo’ed:&lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;1. Drop DB2 instance&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: courier;"&gt;/opt/IBM/db2/V9.1/instance/db2idrop -f db2inst1&lt;/span&gt;&lt;br /&gt;OR version 8&lt;br /&gt;&lt;span style="font-family: courier;"&gt;/usr/opt/db2_08_01/instance/db2idrop -f db2inst1&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;2. Uninstall previous db2&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Stop and drop the DB2 Admin server first.&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: courier;"&gt;bash-3.00# su dasusr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;bash-3.00$ pwd&lt;/span&gt;&lt;br /&gt;/home/dasusr/das/bin&lt;br /&gt;&lt;span style="font-family: courier;"&gt;bash-3.00$ ./db2admin stop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL4407W  The DB2 Administration Server was stopped successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Drop the DAS server as root:&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: courier;"&gt;bash-3.00# pwd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;/opt/IBM/db2/V9.1/instance&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;bash-3.00# ./dasdrop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL4410W  The DB2 Administration Server is not active.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;DBI1070I Program dasdrop completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then db2_deinstall UDB:&lt;/p&gt; &lt;p&gt;bash-3.00# pwd&lt;br /&gt;&lt;span style="font-family: courier;"&gt;/opt/IBM/db2/V9.1/install&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;bash-3.00# ./db2_deinstall -a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;DBI1016I Program db2_deinstall is performing uninstallation.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;          Please wait.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;The execution completed successfully.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;3. Run db2 V9.1 install, db2_install will install at console (non-GUI).&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;4. After install, create an instance&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Make sure db2fence1 and db2inst1 directories created under /home and with correct&lt;br /&gt;permissions:&lt;br /&gt;&lt;span style="font-family: courier;"&gt;drwxr-xr-x   2 db2fenc1 db2admi         256 May 04 15:19 db2fenc1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;drwxr-xr-x   2 db2inst1 db2admi         256 May 04 15:19 db2inst1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt; then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;/opt/IBM/db2/V9.1/instance/db2icrt -u db2fenc1 db2inst1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;bash-3.00# ./db2icrt -u db2fenc1 db2inst1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;DBI1070I Program db2icrt completed successfully.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-6551116895449729073?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/6551116895449729073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/db2-v91-how-to-re-create-instance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/6551116895449729073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/6551116895449729073'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/db2-v91-how-to-re-create-instance.html' title='DB2 V9.1: How to Re-create a Instance'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-8979598277399710504</id><published>2009-02-05T17:59:00.000-08:00</published><updated>2009-02-05T18:00:16.703-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ora-12705'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>ORA-12705: Cannot access NLS data files or invalid environment specified</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;This tip resolves Oracle client error: “&lt;span style="background-color: rgb(255, 255, 0);"&gt;ORA-12705: Cannot access NLS data files or invalid environment specified&lt;/span&gt;“.  According to Oracle documentation, “ORA-12705″ can happen under the following conditions:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;1. ORA-12705 with incorrect NLS_LANG parameter&lt;br /&gt;2. ORA-12705 with incorrectly specified ORA_NLSx&lt;br /&gt;3. ORA-12705 from incorrect Oracle install or configuration&lt;br /&gt;4. ORA-12705 when using Special Character sets&lt;br /&gt;5. ORA-12705 when connecting with SQL*Net&lt;br /&gt;6. ORA-12705 during migrations&lt;br /&gt;7. ORA-12705 when connecting with SQL*Plus&lt;br /&gt;8. ORA-12705 when connecting with language pre-compilers&lt;br /&gt;9. ORA-12705 during Export/Import&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Try doing the following to fix this error on the client side. On the client Windows machine (this tip&lt;br /&gt;is only for Windows), The NLS_LANG must be unset in the Windows registry (re-naming works the best because you know what you changed). Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it. Then try SQLPlus again. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-8979598277399710504?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/8979598277399710504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/ora-12705-cannot-access-nls-data-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/8979598277399710504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/8979598277399710504'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/ora-12705-cannot-access-nls-data-files.html' title='ORA-12705: Cannot access NLS data files or invalid environment specified'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-3421642003676355336</id><published>2009-02-05T17:57:00.000-08:00</published><updated>2009-02-05T17:59:01.879-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='tar'/><category scheme='http://www.blogger.com/atom/ns#' term='directories'/><title type='text'>How to "tar" Only Directories, Not Files</title><content type='html'>&lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;Sometimes you want to preserve only a directory structure into a tar ball without having to archive the files themselves. This can happen if you want to backup a pre-defined directory structure, run some tests, and do not really care about the files created during the test. You can use the UNIX commands ‘find’ and ‘tar’ to do that.&lt;/span&gt;&lt;/p&gt; &lt;div style="margin-left: 40px; font-family: trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;# find bwtest -type d &gt; dirlist.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# more dirlist.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1/458986&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1/217128&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1/217136&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd1/217182&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd2/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/dd3/3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bwtest/reports&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# tar -cvf ./bwtest.tar -L dirlist.txt&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/div&gt; &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;content.tar will contain only the directories, no files.  This should work on&lt;br /&gt;all UNIX and Linux platforms.&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-3421642003676355336?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/3421642003676355336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-tar-only-directories-not-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/3421642003676355336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/3421642003676355336'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-to-tar-only-directories-not-files.html' title='How to &quot;tar&quot; Only Directories, Not Files'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-3339843816106853676</id><published>2009-02-05T17:55:00.000-08:00</published><updated>2009-02-05T17:57:32.760-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='startup'/><category scheme='http://www.blogger.com/atom/ns#' term='restore'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Simple Commands To Backup and Restore a Oracle Database</title><content type='html'>&lt;span style="font-family: courier;"&gt;Below shows simple steps in Oracle 9i and 10g to backup and restore Oracle databases; the goal is for the tasks to be called remotely so they can be automated as part of a performance test execution (i.e., always restores a known baseline before start a test!) Applies to Windows (steps apply to other platform with minor modifications).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier; text-decoration: underline;"&gt;1) Shuts down the listener&lt;/span&gt;&lt;span style="font-family: courier; text-decoration: underline;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;F:\_backup&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: courier;"&gt;lsnrctl stop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;LSNRCTL for 32-bit Windows: Version 10.2.0.3.0 - Production on 23-MAY-2007 09:49:20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Copyright (c) 1991, 2006, Oracle.  All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pw213)(PORT=1521)))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;The command completed successfully&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier; font-weight: bold; text-decoration: underline;"&gt;2) Shuts down the instance:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;F:\_backup&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;sqlplus /nolog&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 23 09:49:27&lt;br /&gt;2007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;connect sys as sysdba&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Enter password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Connected.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;shutdown immediate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Database closed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Database dismounted.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;ORACLE instance shut down.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL&gt; quit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;With the Partitioning, OLAP and Data Mining options&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier; font-weight: bold; text-decoration: underline;"&gt;3) Use operating system “copy” command to copy the entire “oradata” directory to your backup location:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;F:\_backup&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;xcopy /Y/E D:\oradata oradata_2007_05_21&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Copies all oradata to the&lt;br /&gt;“oradata_2007_05_21″ directory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;4) To restore, repeat steps 1) and 2), then copy back the files from “oradata_2007_05_21″  to &lt;/span&gt;&lt;span style="font-family: courier;"&gt;your run-time “oradata” directory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier; font-weight: bold; text-decoration: underline;"&gt;5) Start up listener:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;F:\_backup&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;lsnrctl start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier; font-weight: bold; text-decoration: underline;"&gt;6) Start up instance:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;F:\_backup&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;sqlplus /nolog&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 23 09:49:27 2007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;connect sys as sysdba&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Enter password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;Connected to an idle instance.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;SQL&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;startup&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-3339843816106853676?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/3339843816106853676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/simple-commands-to-backup-and-restore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/3339843816106853676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/3339843816106853676'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/simple-commands-to-backup-and-restore.html' title='Simple Commands To Backup and Restore a Oracle Database'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-6591062570973430144</id><published>2009-02-05T17:48:00.000-08:00</published><updated>2009-02-05T17:54:47.160-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='df'/><category scheme='http://www.blogger.com/atom/ns#' term='lspv'/><category scheme='http://www.blogger.com/atom/ns#' term='mount'/><category scheme='http://www.blogger.com/atom/ns#' term='hdisk'/><category scheme='http://www.blogger.com/atom/ns#' term='lv'/><category scheme='http://www.blogger.com/atom/ns#' term='aix'/><title type='text'>5 Steps To Increase Storage for Your Existing Logical Volume (AIX)</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;Steps taken to to increase the storage for an existing logical volume. The following commands&lt;br /&gt;are for AIX. The steps, however, are universal. You only need to substitute the commands for other platforms.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;1) How big is the vg?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;oracle style="font-family: courier new;"&gt;/home/oracle $ lsvg oradata_vg&lt;br /&gt;VOLUME GROUP:       oradata_vg               VG IDENTIFIER:  00224ada00004c000000010f64352701&lt;br /&gt;VG STATE:           active                   PP SIZE:        128 megabyte(s)&lt;br /&gt;VG PERMISSION:      read/write               TOTAL&lt;br /&gt;PPs:      1086 (139008 megabytes)&lt;br /&gt;MAX LVs:            256                      FREE PPs:       685 (87680 megabytes)&lt;br /&gt;LVs:                2                        USED PPs:       401 (51328 megabytes)&lt;br /&gt;OPEN LVs:           2                        QUORUM:         2&lt;br /&gt;TOTAL PVs:&lt;br /&gt;2                        VG DESCRIPTORS: 3&lt;br /&gt;STALE PVs:          0                        STALE PPs:      0&lt;br /&gt;ACTIVE PVs:         2                        AUTO ON:        yes&lt;br /&gt;MAX PPs per VG:     32512&lt;br /&gt;MAX PPs per PV:     1016                     MAX PVs:        32&lt;br /&gt;LTG size (Dynamic): 128&lt;br /&gt;kilobyte(s)          AUTO SYNC:      no&lt;br /&gt;HOT SPARE:          no                       BB POLICY:      relocatable&lt;/oracle&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;2) Use lspv to find out which hdisk belong to which vg:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;oracle&gt;/home/oracle $ lspv&lt;br /&gt;hdisk2          00224ada0abc41b2                    rootvg          active&lt;br /&gt;hdisk0          00224adaee4d5b0e None&lt;br /&gt;hdisk1          00224adaa0d19b45                    None&lt;br /&gt;hdisk3          00224ada432ae745                    oradata_vg      active&lt;br /&gt;hdisk4          00224adaf645417c                    oradata_vg      active&lt;br /&gt;hdisk5          00224adafc227f17                    udbdata_vg active&lt;br /&gt;hdisk6          00224adafc22d1ed                    udbdata_vg      active&lt;br /&gt;hdisk7          00224adafc3ab232                    udbdata_vg      active&lt;br /&gt;hdisk8          00224adafc3ab64b                    udbdata_vg      active&lt;br /&gt;hdisk9          0003321524243690                    udbdata_vg active&lt;br /&gt;hdisk10         00033215242458d4                    udbdata_vg      active&lt;br /&gt;hdisk11         00224adab4c1999c                    pagevg          active&lt;br /&gt;hdisk12         00224adab4c199c9                    oracle_vg       active&lt;br /&gt;hdisk13         00224adafc20bbc5                    oracle_vg active&lt;br /&gt;hdisk14         00224adafc20bed6                    oracle_vg       active&lt;/oracle&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;hdisk3 and hdisk4 belong to oradata_vg.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;3) how large is each hdisk?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;oracle&gt;/home/oracle $ lspv hdisk3&lt;br /&gt;PHYSICAL VOLUME:    hdisk3                   VOLUME GROUP:     oradata_vg&lt;br /&gt;PV IDENTIFIER:      00224ada432ae745 VG IDENTIFIER     00224ada00004c000000010f64352701&lt;br /&gt;PV STATE:           active&lt;br /&gt;STALE PARTITIONS:&lt;br /&gt;0                        ALLOCATABLE:      yes&lt;br /&gt;PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  2&lt;br /&gt;TOTAL PPs:          543 (69504 megabytes)    VG DESCRIPTORS:   2&lt;br /&gt;FREE PPs:           342 (43776 megabytes)    HOT SPARE:        no&lt;br /&gt;USED PPs:           201 (25728 megabytes)    MAX REQUEST:      128 kilobytes&lt;br /&gt;FREE DISTRIBUTION:  108..00..17..108..109&lt;br /&gt;USED DISTRIBUTION:  01..109..91..00..00&lt;br /&gt;&lt;oracle&gt;/home/oracle $&lt;br /&gt;lspv hdisk4&lt;br /&gt;PHYSICAL VOLUME:    hdisk4                   VOLUME GROUP:     oradata_vg&lt;br /&gt;PV IDENTIFIER:      00224adaf645417c VG IDENTIFIER     00224ada00004c000000010f64352701&lt;br /&gt;PV STATE:           active&lt;br /&gt;STALE PARTITIONS:   0                        ALLOCATABLE:      yes&lt;br /&gt;PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  1&lt;br /&gt;TOTAL PPs:          543 (69504 megabytes)    VG DESCRIPTORS:   1&lt;br /&gt;FREE&lt;br /&gt;PPs:           343 (43904 megabytes)    HOT SPARE:        no&lt;br /&gt;USED PPs:           200 (25600 megabytes)    MAX REQUEST:      128 kilobytes&lt;br /&gt;FREE DISTRIBUTION:  109..00..17..108..109&lt;br /&gt;USED DISTRIBUTION:  00..109..91..00..00&lt;/oracle&gt;&lt;/oracle&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;so total about 69G _ 69G = 140G.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;4) now, how large is the oradata_lv currently?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;oracle&gt;/home/oracle $ lslv oradata_lv&lt;br /&gt;LOGICAL VOLUME:     oradata_lv             VOLUME GROUP:   oradata_vg&lt;br /&gt;LV IDENTIFIER:      00224ada00004c000000010f64352701.1 PERMISSION:     read/write&lt;br /&gt;VG&lt;br /&gt;STATE:           active/complete        LV STATE:       opened/syncd&lt;br /&gt;TYPE:               jfs2                   WRITE VERIFY:   off&lt;br /&gt;MAX LPs:            512                    PP SIZE:        128 megabyte(s)&lt;br /&gt;COPIES:             1                      SCHED POLICY:&lt;br /&gt;striped&lt;br /&gt;LPs:                400                    PPs:            400&lt;br /&gt;STALE PPs:          0                      BB POLICY:      relocatable&lt;br /&gt;INTER-POLICY:       maximum                RELOCATABLE:    no&lt;br /&gt;INTRA-POLICY:       middle                 UPPER BOUND:    2&lt;br /&gt;MOUNT POINT:&lt;br /&gt;/oradata               LABEL:          /oradata&lt;br /&gt;MIRROR WRITE CONSISTENCY: on/ACTIVE&lt;br /&gt;EACH LP COPY ON A SEPARATE PV ?: yes (superstrict)&lt;br /&gt;Serialize IO ?:     NO&lt;br /&gt;STRIPE WIDTH:       2&lt;br /&gt;STRIPE SIZE:        128K&lt;/oracle&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;looks like LPs=400 each is 128M = 51GB.&lt;br /&gt;Still available 140G - 51GB = 90GB.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;and from the lsvg, we know that:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;VG PERMISSION:      read/write               TOTAL PPs:      1086 (139008 megabytes)&lt;br /&gt;MAX LVs:            256                      FREE&lt;br /&gt;PPs:       685 (87680 megabytes)&lt;br /&gt;LVs:                2                        USED PPs:       401 (51328 megabytes)&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;5a) unmount the fs first&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5b) change the logical volume in smitty - increase MAXIMUM NUMBER OF LOGICAL PARTITIONS to 1086 - ran OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5c) increase size of lv, enter number of ADDITIONAL LPs: to 684 (not 685 because stripped volumes require even numbers; also don’t choose PVs) - ran OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5d) change file system, Change/Show characteristics of an Enhanced JFS; set the new&lt;br /&gt;“number of units (of 512)” to 283978437 - ran OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5e) check the new fs:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;6) Validate everything:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bash-2.05b# df -k&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/dev/oradata_lv   142082048 106387720   26%       22     1% /oradata&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;the logical volume is now 142GB! It worked.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-6591062570973430144?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/6591062570973430144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/5-steps-to-increase-storage-for-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/6591062570973430144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/6591062570973430144'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/5-steps-to-increase-storage-for-your.html' title='5 Steps To Increase Storage for Your Existing Logical Volume (AIX)'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-4319073475693210459</id><published>2009-02-05T17:44:00.000-08:00</published><updated>2009-02-05T17:47:25.343-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scsi'/><category scheme='http://www.blogger.com/atom/ns#' term='multipathing driver'/><category scheme='http://www.blogger.com/atom/ns#' term='disks'/><category scheme='http://www.blogger.com/atom/ns#' term='array'/><category scheme='http://www.blogger.com/atom/ns#' term='hba'/><category scheme='http://www.blogger.com/atom/ns#' term='io stack'/><category scheme='http://www.blogger.com/atom/ns#' term='storage'/><title type='text'>A Picture of the typical IO Stack</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://performancewiki.com/img/io-stack.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 300px; height: 478px;" src="http://performancewiki.com/img/io-stack.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;I/O stack components Overview&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size:85%;"&gt;Typically the stack consists of the following&lt;br /&gt;• Database&lt;br /&gt;• Character or  block device driver&lt;br /&gt;• Multipathing driver&lt;br /&gt;• SCSI driver&lt;br /&gt;• HBA&lt;br /&gt;•  System Bus&lt;br /&gt;• Switch/iSCSI routers&lt;br /&gt;• Storage Array&lt;br /&gt;• Disks&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Example of  vendors:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;ASM-Database IBM Oracle&lt;br /&gt;Character or block device driver&lt;br /&gt;Multipathing  driver – PowerPath, Windows MPIO&lt;br /&gt;SCSI driver&lt;br /&gt;HBA – Host Bus Adapter,  Qlogic (IBM), Emulex&lt;br /&gt;System Bus - PCI&lt;br /&gt;Switch/iSCSI routers – Brocade,  McData&lt;br /&gt;Storage Array – IBM DS8100, EMC, HDS, HP&lt;br /&gt;Disks - Seagate&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;The  database processes makes I/O calls to the block device. The I/O scheduler in  Linux forms the&lt;br /&gt;interface between the generic block layer and the low level  device drivers. The block layer provides&lt;br /&gt;functions that are utilized by the  file systems, databases (10gR2) and the virtual memory manager to submit I/O  requests to block devices. These requests are transformed by the I/O scheduler  and made available to the low-level device drivers. The device drivers consume  the transformed requests and forward them (by using device specific protocols)  to the actual device controllers that perform the I/O operations. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-4319073475693210459?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/4319073475693210459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/picture-of-typical-io-stack.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/4319073475693210459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/4319073475693210459'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/picture-of-typical-io-stack.html' title='A Picture of the typical IO Stack'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-1454804483647070590</id><published>2009-02-05T17:39:00.000-08:00</published><updated>2009-02-05T17:44:18.324-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MB/s'/><category scheme='http://www.blogger.com/atom/ns#' term='transaction'/><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><category scheme='http://www.blogger.com/atom/ns#' term='iops'/><category scheme='http://www.blogger.com/atom/ns#' term='io operations per second'/><title type='text'>IOPS vs. Mbytes/sec</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IOPS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;• The standard unit of measurement for I/O operations per second. Includes all reads and writes.&lt;br /&gt;• This is how you rate a I/O stack components ability to process small block random I/O requests.&lt;br /&gt;• Used to describe I/O rate driven applications (OLTP, random I/O ) Mbytes/s&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mega”Bytes” per sec&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;• Used to measure large block sequential transfer rates, with no response time characterization&lt;br /&gt;• Used to describe data rate driven applications (DSS, OLAP)&lt;br /&gt;• Transaction/s – its anything you claim it to be.&lt;br /&gt;&lt;br /&gt;Oracle query to gather this data from your database:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set lines 250&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set pages 9999&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;spool sysmetric_outp.log&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;alter session set nls_date_format=’dd-mm-yyyy hh24:mi’;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;select min(begin_time), max(end_time),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Physical Read Total Bytes Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Physical_Read_Total_Bps,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Physical Write Total Bytes Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Physical_Write_Total_Bps,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Redo Generated Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Redo_Bytes_per_sec,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Physical Read Total IO Requests Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Physical_Read_IOPS,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Physical Write Total IO Requests Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Physical_write_IOPS,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Redo Writes Per Sec’ then average end) Physical_redo_IOPS,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Current OS Load’ then average end) OS_LOad,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘CPU Usage Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DB_CPU_Usage_per_sec,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Host CPU Utilization (%)’ then average end) Host_CPU_util, –&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;NOTE 100% = 1 loaded RAC node&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sum(case metric_name when ‘Network Traffic Volume Per Sec’ then average end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Network_bytes_per_sec,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;snap_id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;from dba_hist_sysmetric_summary&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;group by snap_id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;order by snap_id;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;spool off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[source: CERN]&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-1454804483647070590?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/1454804483647070590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/iops-vs-mbytessec.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1454804483647070590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1454804483647070590'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/iops-vs-mbytessec.html' title='IOPS vs. Mbytes/sec'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2580514370523892015</id><published>2009-02-05T17:31:00.000-08:00</published><updated>2009-02-05T17:39:02.311-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MB/s'/><category scheme='http://www.blogger.com/atom/ns#' term='transaction system'/><category scheme='http://www.blogger.com/atom/ns#' term='io requests'/><category scheme='http://www.blogger.com/atom/ns#' term='gigabytes/sec'/><category scheme='http://www.blogger.com/atom/ns#' term='iops'/><title type='text'>How Much IO Does Your Application Generate?</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;IO rate of 1+ Gigabytes/sec is rarely achievable, but hundreds of  Megabytes/sec is achieved in lots of high-end production environment. Keep those  numbers in mind when planning for what’s possible.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;In Oracle, use AWR reports to determine current I/O metrics (Instance  Activity Stats per sec).&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;• IOPS = “physical reads total I/O requests” + “physical writes total I/O  requests”&lt;br /&gt;• MBytes/s = “physical reads total bytes” + physical writes total  bytes”&lt;br /&gt;• For RAC environments - aggregate IOPS or MBytes/s for all  nodes&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Now the tricky part – estimating expected I/O throughput rates&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;• Establish what is being expanded – more users, new reports&lt;br /&gt;• Pull I/O  stats for a given session or transaction and extrapolate to the required number  of users.&lt;br /&gt;• Ensure data points are representative of the new workload&lt;br /&gt;•  Know when your Web users get on your system (e.g., peak hour  transactions)&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;For new or non-existing applications, use business rules or data model  transaction profiles flow to understand “what is a transaction”, and then  extrapolate for transactions/s or per hour. Optionally you can use the numbers  we have seen in our consulting gigs. Note that these are just guideline  values.&lt;br /&gt;Use the following as basic guidelines for OLTP (&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Online  transaction processing) systems :&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Low transaction system – 1000 IOPS or 200MBytes/s&lt;br /&gt;Medium transaction  system – 5000 IOPS or 600 Mbytes/s&lt;br /&gt;High-end transaction system – 10,000 IOPS  or 1Gbytes/s (almost rarely achievable and usually &lt;a title="TPC-C" href="http://www.tpc.org/tpcc/"&gt;TPC-C&lt;/a&gt; type workloads)&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Use the following as basic guidelines for DSS (&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Decision Support  Systems) (units are in Gig = Gigabytes/Sec):&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;2 Gig I/O entry level DW&lt;br /&gt;4-8 Gig I/O High End DW&lt;br /&gt;10+ Gig I/O Very High  END DW not yet seen in production !&lt;br /&gt;40+ Gig I/O High End  TPC-H&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2580514370523892015?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2580514370523892015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-much-io-does-your-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2580514370523892015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2580514370523892015'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/how-much-io-does-your-application.html' title='How Much IO Does Your Application Generate?'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2662394434197666983</id><published>2009-02-05T17:24:00.000-08:00</published><updated>2009-02-05T17:31:12.303-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iostat'/><category scheme='http://www.blogger.com/atom/ns#' term='umount'/><category scheme='http://www.blogger.com/atom/ns#' term='top'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='vmstat'/><title type='text'>Common Linux Commands By Examples</title><content type='html'>&lt;p&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;These are  usually invoked by root and used for system maintenance or emergency filesystem  repairs. Use with caution, as some of these commands may damage your system if  misused.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Users and  Groups&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;users&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show all logged on  users. This is the approximate equivalent of &lt;strong&gt;who -q&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;groups&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Lists the current  user and the groups she belongs to. This corresponds to the $GROUPS internal  variable, but gives the group names, rather than the numbers.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table1" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;groups&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozita cdrom cdwriter audio xgrp&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;echo $GROUPS&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;501&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;chown&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;chgrp&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;chown&lt;/strong&gt; command changes the ownership of a file or files. This  command is a useful method that &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black;"&gt;root&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; can use to shift  file ownership from one user to another. An ordinary user may not change the  ownership of files, not even her own files.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table2" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root# &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;chown bozo *.txt&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;chgrp&lt;/strong&gt; command changes the &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black;"&gt;group&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; ownership of a  file or files. You must be owner of the file(s) as well as a member of the  destination group (or &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black;"&gt;root&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;) to use this  operation. &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table3" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;chgrp –recursive dunderheads *.data&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  The “dunderheads” group will now own all the “*.data” files&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#+ all the way down the $PWD directory tree (that’s what “recursive” means).&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;useradd&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;userdel&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;useradd&lt;/strong&gt; administrative command adds a user account to the  system and creates a home directory for that particular user, if so specified.  The corresponding &lt;strong&gt;userdel&lt;/strong&gt; command removes a user account from  the system and deletes associated files.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table4" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;adduser&lt;/strong&gt; command is a synonym for &lt;strong&gt;useradd&lt;/strong&gt; and  is usually a symbolic link to it.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;id&lt;/strong&gt; command lists the real and effective user IDs and the group  IDs of the current user. This is the counterpart to the $UID, $EUID, and $GROUPS  internal Bash variables.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table5" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;id&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;uid=501(bozo) gid=501(bozo) groups=501(bozo),22(cdrom),80(cdwriter),81(audio)&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;echo $UID&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;501&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;who&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show all users  logged on to the system.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table6" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;who&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo  tty1     Apr 27 17:45&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; bozo  pts/0    Apr 27 17:46&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; bozo  pts/1    Apr 27 17:47&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; bozo  pts/2    Apr 27 17:49&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;-m&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; gives detailed  information about only the current user. Passing any two arguments to  &lt;strong&gt;who&lt;/strong&gt; is the equivalent of &lt;strong&gt;who -m&lt;/strong&gt;, as in  &lt;strong&gt;who am i&lt;/strong&gt; or &lt;strong&gt;who The Man&lt;span style="font-weight: normal;"&gt;.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table7" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;who -m&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;localhost.localdomain!bozo  pts/2    Apr 27 17:49&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;whoami&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; is similar to  &lt;strong&gt;who -m&lt;/strong&gt;, but only lists the user name.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table8" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;whoami&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;w&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show all logged on  users and the processes belonging to them. This is an extended version of  &lt;strong&gt;who&lt;/strong&gt;. The output of &lt;strong&gt;w&lt;/strong&gt; may be piped to  &lt;strong&gt;grep&lt;/strong&gt; to find a specific user and/or process.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table9" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;w | grep startx&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo  tty1     -                 4:22pm  6:41   4.47s  0.45s  startx&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;logname&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show current user’s  login name (as found in &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;/var/run/utmp&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;). This is a  near-equivalent to &lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.performancewiki.com/system.html#WHOAMIREF"&gt;&lt;strong&gt;whoami&lt;/strong&gt;&lt;/a&gt;,  above.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table10" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;logname&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;whoami&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;However…&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table11" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;su&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Password: ……&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash# &lt;strong&gt;whoami&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash# &lt;strong&gt;logname&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bozo&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;su&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Runs a program or  script as a &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;s&lt;/span&gt;&lt;/em&gt;ubstitute  &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;u&lt;/span&gt;&lt;/em&gt;ser. &lt;strong&gt;su  rjones&lt;/strong&gt; starts a shell as user &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;rjones&lt;/span&gt;&lt;/em&gt;. A naked &lt;strong&gt;su&lt;/strong&gt;  defaults to &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;root&lt;/span&gt;&lt;/em&gt;. &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;sudo&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Runs a command as  root (or another user). This may be used in a script, thus permitting a regular  user to run the script.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table12" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Some commands.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;sudo cp /root/secretfile /home/bozo/secret&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Some more commands.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The file &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;/etc/sudoers&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; holds the names of  users permitted to invoke &lt;strong&gt;sudo&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;passwd&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Sets or changes a  user’s password.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;passwd&lt;/strong&gt; can be used in a script, but &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;should not&lt;/span&gt;&lt;/em&gt; be. &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table13" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  set-new-password.sh: Not a good idea.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  This script must be run as root,&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#+ or better yet, not run at all.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;ROOT_UID=0         # Root has $UID 0.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;E_WRONG_USER=65    # Not root?&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;if [ “$UID” -ne “$ROOT_UID” ]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  echo; echo “Only root can run this script.”; echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  exit $E_WRONG_USER&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  echo; echo “You should know better than to run this script, root.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;fi  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;username=bozo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;NEWPASSWORD=security_violation&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “$NEWPASSWORD” | passwd –stdin “$username”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  The ‘–stdin’ option to ‘passwd’ permits&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#+ getting new password from stdin (or a pipe).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo; echo “User $username’s password changed!”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Using the ‘passwd’ command in a script is dangerous.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;ac&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show users’ logged  in time, as read from &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;/var/log/wtmp&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. This is one of  the GNU accounting utilities.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table14" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;ac&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        total       68.08&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;last&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;last&lt;/span&gt;&lt;/em&gt; logged in users, as read from  &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;/var/log/wtmp&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. This command can  also show remote logins.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;newgrp&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Change user’s group  ID without logging out. This permits access to the new group’s files. Since  users may be members of multiple groups simultaneously, this command finds  little use.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Terminals&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tty&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Echoes the name of  the current user’s terminal. Note that each separate xterm window counts as a  different terminal.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table15" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;strong&gt;tty&lt;/strong&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;/dev/pts/1&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;stty&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Shows and/or  changes terminal settings. This complex command, used in a script, can control  terminal behavior and the way output displays. See the info page, and study it  carefully.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ERASE"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-1.  setting an erase character&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ERASE"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table16" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# erase.sh: Using “stty” to set an erase character when reading input.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo -n “What is your name? “&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;read name                      # Try to erase characters of input.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                               # Won’t work.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “Your name is $name.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;stty erase ‘#’                 # Set “hashmark” (#) as erase character.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo -n “What is your name? “&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;read name                      # Use # to erase last character typed.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “Your name is $name.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ERASE"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="SECRETPW"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-2.  secret password: Turning off terminal echoing &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="SECRETPW"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table17" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo -n “Enter password “&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;read passwd&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “password is $passwd”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo -n “If someone had been looking over your shoulder, “&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “your password would have been compromised.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo &amp;amp;&amp;amp; echo  # Two line-feeds in an “and list”.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;stty -echo    # Turns off screen echo.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo -n “Enter password again “&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;read passwd&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “password is $passwd”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;stty echo     # Restores screen echo.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="SECRETPW"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="SECRETPW"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;A creative use of  stty is detecting a user keypress (without hitting ENTER).&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="SECRETPW"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-3.  Keypress detection&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table18" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# keypress.sh: Detect a user keypress (”hot keyboard”).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;old_tty_settings=$(stty -g)   # Save old settings.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;stty -icanon&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Keypress=$(head -c1)          # or $(dd bs=1 count=1 2&gt; /dev/null)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                              # on non-GNU systems&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “Key pressed was ”"$Keypress””.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;stty “$old_tty_settings”      # Restore old settings.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Thanks, Stephane Chazelas.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td style="padding: 3.75pt;" colspan="3" valign="top"&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;terminals and  modes&lt;/span&gt;&lt;/strong&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt; &lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Normally, a  terminal works in the &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;canonical&lt;/span&gt;&lt;/em&gt; mode. When a user hits a key,  the resulting character does not immediately go to the program actually running  in this terminal. A buffer local to the terminal stores keystrokes. When the  user hits the ENTER key, this sends all the stored keystrokes to the program  running. There is even a basic line editor inside the  terminal.&lt;/span&gt;&lt;/strong&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;  &lt;table class="MsoNormalTable" id="table19" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;stty -a&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;speed 9600 baud; rows 36; columns 96; line = 0;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = ; eol2 = ;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Using canonical  mode, it is possible to redefine the special keys for the local terminal line  editor. &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table20" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;cat &gt; filexxx&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;whaIfoo barhello world&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;cat filexxx&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;hello world            &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;bash$ wc -c &lt;&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;13             &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;The process  controlling the terminal receives only 13 characters (12 alphabetic ones, plus a  newline), although the user hit 26 keys. &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;In non-canonical  (&lt;/span&gt;&lt;span class="quote"&gt;“raw”&lt;/span&gt;) mode, every key hit (including special  editing keys such as ctl-H) sends a character immediately to the controlling  process.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;a name="AEN10029"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;The Bash prompt  disables both &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;icanon&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt; and &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;echo&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;, since it  replaces the basic terminal line editor with its own more elaborate one. For  example, when you hit ctl-A at the Bash prompt, there’s no ^A echoed by the  terminal, but Bash gets a \1 character, interprets it, and moves the cursor to  the begining of the line.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tset&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show or initialize  terminal settings. This is a less capable version of  &lt;strong&gt;stty&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table21" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;tset -r&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Terminal type is xterm-xfree86.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Kill is control-U (^U).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Interrupt is control-C (^C).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;setserial&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Set or display  serial port parameters. This command must be run by root user and is usually  found in a system setup script.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table22" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# From /etc/pcmcia/serial script:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;IRQ=`setserial /dev/$DEVICE | sed -e ’s/.*IRQ: //’`&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;getty&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;agetty&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The initialization  process for a terminal uses &lt;strong&gt;getty&lt;/strong&gt; or &lt;strong&gt;agetty&lt;/strong&gt; to  set it up for login by a user. These commands are not used within user shell  scripts. Their scripting counterpart is &lt;strong&gt;stty&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mesg&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Enables or disables  write access to the current user’s terminal. Disabling access would prevent  another user on the network to write to the terminal.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table23" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;TIP&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;It  can be very annoying to have a message about ordering pizza suddenly appear in  the middle of the text file you are editing. On a multi-user network, you might  therefore wish to disable write access to your terminal when you need to avoid  interruptions.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;wall&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This is an acronym  for &lt;/span&gt;&lt;span class="quote"&gt;“write all”&lt;/span&gt;, i.e., sending a message to all  users at every terminal logged into the network. It is primarily a system  administrator’s tool, useful, for example, when warning everyone that the system  will shortly go down due to a problem (see Example 17-2).&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table24" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;wall System going down for maintenance in 5 minutes!&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Broadcast message from bozo (pts/1) Sun Jul  8 13:53:27 2001…&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; System going down for maintenance in 5 minutes!&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="display: none; font-size: 8.5pt; color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table25" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;If  write access to a particular terminal has been disabled with  &lt;strong&gt;mesg&lt;/strong&gt;, then &lt;strong&gt;wall&lt;/strong&gt; cannot send a message to  it.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;dmesg&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Lists all system  bootup messages to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;stdout&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. Handy for  debugging and ascertaining which device drivers were installed and which system  interrupts in use. The output of &lt;strong&gt;dmesg&lt;/strong&gt; may, of course, be  parsed with grep, sed, or awk from within a script.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table26" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;dmesg | grep hda&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Kernel command line: ro root=/dev/hda2&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; hda: IBM-DLGA-23080, ATA DISK drive&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; hda: 6015744 sectors (3080 MB) w/96KiB Cache, CHS=746/128/63&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; hda: hda1 hda2 hda3 &lt;&gt; hda4&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Information and  Statistics&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;uname&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Output system  specifications (OS, kernel version, etc.) to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;stdout&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. Invoked with the  &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-a&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option, gives  verbose system info (see Example 12-4). The &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-s&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option shows only  the OS type.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table27" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;uname -a&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Linux localhost.localdomain 2.2.15-2.5.0 #1 Sat Feb 5 00:13:43 EST 2000 i686 unknown&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;uname -s&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Linux&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;arch&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show system  architecture. Equivalent to &lt;strong&gt;uname -m&lt;/strong&gt;. See Example  10-25.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table28" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;arch&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;i686&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;uname -m&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;i686&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lastcomm&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Gives information  about previous commands, as stored in the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/account/pacct&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; file. Command name  and user name can be specified by options. This is one of the GNU accounting  utilities.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lastlog&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List the last login  time of all system users. This references the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/log/lastlog&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; file.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table29" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;lastlog&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root          tty1                      Fri Dec  7 18:43:21 -0700 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; bin                                     **Never logged in**&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; daemon                                  **Never logged in**&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; bozo          tty1                      Sat Dec  8 21:14:29 -0700 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;lastlog | grep root&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root          tty1                      Fri Dec  7 18:43:21 -0700 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="display: none; font-size: 8.5pt; color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table30" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: red none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;CAUTION&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This command will  fail if the user invoking it does not have read permission for the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/log/lastlog&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;  file.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lsof&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List open files.  This command outputs a detailed table of all currently open files and gives  information about their owner, size, the processes associated with them, and  more. Of course, &lt;strong&gt;lsof&lt;/strong&gt; may be piped to grep and/or awk to parse  and analyze its results.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table31" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;lsof&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;COMMAND    PID    USER   FD   TYPE     DEVICE    SIZE     NODE NAME&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; init         1    root  mem    REG        3,5   30748    30303 /sbin/init&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; init         1    root  mem    REG        3,5   73120     8069 /lib/ld-2.1.3.so&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; init         1    root  mem    REG        3,5  931668     8075 /lib/libc-2.1.3.so&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; cardmgr    213    root  mem    REG        3,5   36956    30357 /sbin/cardmgr&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;strace&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Diagnostic and  debugging tool for tracing system calls and signals. The simplest way of  invoking it is &lt;strong&gt;strace COMMAND&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table32" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;strace df&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;execve(”/bin/df”, [”df”], [/* 45 vars */]) = 0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; uname({sys=”Linux”, node=”bozo.localdomain”, …}) = 0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; brk(0)                                  = 0×804f5e4&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;            &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This is the Linux  equivalent of &lt;strong&gt;truss&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;free&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KEYPRESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Shows memory and  cache usage in tabular form. The output of this command lends itself to parsing,  using &lt;/span&gt;&lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.performancewiki.com/textproc.html#GREPREF"&gt;&lt;strong&gt;grep&lt;/strong&gt;&lt;/a&gt;,  &lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.performancewiki.com/awk.html#AWKREF"&gt;&lt;strong&gt;awk&lt;/strong&gt;&lt;/a&gt;  or &lt;strong&gt;Perl&lt;/strong&gt;. The &lt;strong&gt;procinfo&lt;/strong&gt; command shows all the  information that &lt;strong&gt;free&lt;/strong&gt; does, and much more.&lt;/p&gt; &lt;table class="MsoNormalTable" id="table33" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;free&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                total       used       free     shared    buffers     cached&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Mem:         30504      28624       1880      15820       1608       16376&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   -/+ buffers/cache:      10640      19864&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Swap:        68540       3128      65412&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;To show unused RAM  memory:&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table34" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;free | grep Mem | awk ‘{ print $4 }’&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;1880&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;procinfo&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Extract and list  information and statistics from the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/proc&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; pseudo-filesystem.  This gives a very extensive and detailed listing.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table35" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;procinfo | grep Bootup&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Bootup: Wed Mar 21 15:15:50 2001    Load average: 0.04 0.21 0.34 3/47 6829&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lsdev&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List devices, that  is, show installed hardware.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table36" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;lsdev&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Device            DMA   IRQ  I/O Ports&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; ————————————————&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; cascade             4     2 &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; dma                          0080-008f&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; dma1                         0000-001f&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; dma2                         00c0-00df&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; fpu                          00f0-00ff&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; ide0                     14  01f0-01f7 03f6-03f6&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;du&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show (disk) file  usage, recursively. Defaults to current working directory, unless otherwise  specified.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table37" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;du -ach&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;1.0k    ./wi.sh&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 1.0k    ./tst.sh&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 1.0k    ./random.file&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 6.0k    .&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 6.0k    total&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;df&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Shows filesystem  usage in tabular form.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table38" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;df&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Filesystem           1k-blocks      Used Available Use% Mounted on&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; /dev/hda5               273262     92607    166547  36% /&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; /dev/hda8               222525    123951     87085  59% /home&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; /dev/hda7              1408796   1075744    261488  80% /usr&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;stat&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Gives detailed and  verbose &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;stat&lt;/span&gt;&lt;/em&gt;istics on a given  file (even a directory or device file) or set of files.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table39" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;stat test.cru&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  File: “test.cru”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Size: 49970        Allocated Blocks: 100          Filetype: Regular File&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Mode: (0664/-rw-rw-r–)         Uid: (  501/ bozo)  Gid: (  501/ bozo)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Device:  3,8   Inode: 18185     Links: 1    &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Access: Sat Jun  2 16:40:24 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Modify: Sat Jun  2 16:40:24 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Change: Sat Jun  2 16:40:24 2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;If the target file  does not exist, &lt;strong&gt;stat&lt;/strong&gt; returns an error message.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table40" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;stat nonexistent-file&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;nonexistent-file: No such file or directory&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;vmstat&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Display virtual  memory statistics.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table41" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;vmstat&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   procs                      memory    swap          io system         cpu&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy id&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 0  0  0      0  11040   2636  38952   0   0    33     7  271    88   8   3 89&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;            &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;netstat&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show current  network statistics and information, such as routing tables and active  connections. This utility accesses information in &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/proc/net.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;netstat  -r&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; is equivalent to  route.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;uptime&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Shows how long the  system has been running, along with associated statistics.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table42" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;uptime&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;10:28pm  up  1:57,  3 users,  load average: 0.17, 0.34, 0.27&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;hostname&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Lists the system’s  host name. This command sets the host name in an &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/rc.d&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; setup script  (&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/rc.d/rc.sysinit&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; or similar). It is  equivalent to &lt;strong&gt;uname -n&lt;/strong&gt;, and a counterpart to the $HOSTNAME  internal variable.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table43" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;hostname&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;localhost.localdomain&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;echo $HOSTNAME&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;localhost.localdomain&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;hostid&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Echo a 32-bit  hexadecimal numerical identifier for the host machine.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table44" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;hostid&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;7f0100&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="display: none; font-size: 8.5pt; color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table45" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This command  allegedly fetches a &lt;/span&gt;&lt;span class="quote"&gt;“unique”&lt;/span&gt; serial number for a  particular system. Certain product registration procedures use this number to  brand a particular user license. Unfortunately, &lt;strong&gt;hostid&lt;/strong&gt; only  returns the machine network address in hexadecimal, with pairs of bytes  transposed.&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The network address  of a typical non-networked Linux machine, is found in &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/hosts&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;.&lt;/span&gt;  &lt;table class="MsoNormalTable" id="table46" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;cat /etc/hosts&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;127.0.0.1               localhost.localdomain localhost&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;As it  happens, transposing the bytes of &lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;127.0.0.1&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;, we get  &lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;0.127.1.0&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;, which translates  in hex to &lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;007f0100&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;, the exact  equivalent of what &lt;strong&gt;hostid&lt;/strong&gt; returns, above. There exist only a  few million other Linux machines with this identical &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;hostid&lt;/span&gt;&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;sar&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Invoking  &lt;strong&gt;sar&lt;/strong&gt; (system activity report) gives a very detailed rundown on  system statistics. This command is found on some commercial UNIX systems, but is  not part of the base Linux distribution. It is contained in the sysstat  utilities package, written by &lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="mailto:sebastien.godard@wanadoo.fr" target="_top"&gt;&lt;strong&gt;Sebastien  Godard&lt;/strong&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table47" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;sar&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Linux 2.4.7-10 (localhost.localdomain)        12/31/2001&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 10:30:01 AM       CPU     %user     %nice   %system     %idle&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 10:40:00 AM       all      1.39      0.00      0.77     97.84&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 10:50:00 AM       all     76.83      0.00      1.45     21.72&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 11:00:00 AM       all      1.32      0.00      0.69     97.99&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 11:10:00 AM       all      1.17      0.00      0.30     98.53&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 11:20:00 AM       all      0.51      0.00      0.30     99.19&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 06:30:00 PM       all    100.00      0.00    100.01      0.00&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Average:          all      1.39      0.00      0.66     97.95&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;           &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;readelf&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show information  and statistics about a designated &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;elf&lt;/span&gt;&lt;/em&gt; binary. This is part of the  &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;binutils&lt;/span&gt;&lt;/em&gt; package.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table48" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;readelf -h /bin/bash&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;ELF Header:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Class:                             ELF32&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Data:                              2’s complement, little endian&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Version:                           1 (current)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   OS/ABI:                            UNIX - System V&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   ABI Version:                       0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   Type:                              EXEC (Executable file)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   . . .&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;size&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The &lt;strong&gt;size  [/path/to/binary]&lt;/strong&gt; command gives the segment sizes of a binary  executable or archive file. This is mainly of use to programmers.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table49" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;size /bin/bash&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   text    data     bss     dec     hex filename&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  495971   22496   17392  535859   82d33 /bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;System  Logs&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;logger&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Appends a  user-generated message to the system log (&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/log/messages&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;). You do not have  to be root to invoke &lt;strong&gt;logger&lt;/strong&gt;. &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table50" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;logger Experiencing instability in network connection at 23:10, 05/21.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Now, do a ‘tail /var/log/messages’.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;By embedding a  &lt;strong&gt;logger&lt;/strong&gt; command in a script, it is possible to write debugging  information to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/log/messages&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table51" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;logger -t $0 -i Logging at line “$LINENO”.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# The “-t” option specifies the tag for the logger entry.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# The “-i” option records the process ID.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# tail /var/log/message&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Jul  7 20:48:58 localhost ./test.sh[1712]: Logging at line 3.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;logrotate&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This utility  manages the system log files, rotating, compressing, deleting, and/or mailing  them, as appropriate. Usually &lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.performancewiki.com/system.html#CRONREF"&gt;&lt;strong&gt;crond&lt;/strong&gt;&lt;/a&gt;  runs &lt;strong&gt;logrotate&lt;/strong&gt; on a daily basis.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Adding an  appropriate entry to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/logrotate.conf&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; makes it possible  to manage personal log files, as well as system-wide ones.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Job  Control&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;ps&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black;"&gt;P&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;rocess &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black;"&gt;S&lt;/span&gt;&lt;/em&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tatistics: lists  currently executing processes by owner and PID (process id). This is usually  invoked with &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;ax&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; options, and may  be piped to grep or sed to search for a specific process.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table52" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt; ps ax | grep sendmail&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;295 ?      S      0:00 sendmail: accepting connections on port 25&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;pstree&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Lists currently  executing processes in &lt;/span&gt;&lt;span class="quote"&gt;“tree”&lt;/span&gt; format. The &lt;span style="font-size: 10pt;"&gt;-p&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option shows the  PIDs, as well as the process names.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;top&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Continuously  updated display of most cpu-intensive processes. The &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-b&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option displays in  text mode, so that the output may be parsed or accessed from a  script.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table53" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;top -b&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  8:30pm  up 3 min,  3 users,  load average: 0.49, 0.32, 0.13&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 45 processes: 44 sleeping, 1 running, 0 zombie, 0 stopped&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; CPU states: 13.6% user,  7.3% system,  0.0% nice, 78.9% idle&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Mem:    78396K av,   65468K used,   12928K free,       0K shrd,    2352K buff&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Swap:  157208K av,       0K used,  157208K free                   37244K cached&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   848 bozo      17   0   996  996   800 R     5.6  1.2   0:00 top&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;     1 root       8   0   512  512   444 S     0.0  0.6   0:04 init&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;     2 root       9   0     0    0     0 SW    0.0  0.0   0:00 keventd&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;   …  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;nice&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Run a background  job with an altered priority. Priorities run from 19 (lowest) to -20 (highest).  Only &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;root&lt;/span&gt;&lt;/em&gt; may set the  negative (higher) priorities. Related commands are &lt;strong&gt;renice&lt;/strong&gt;,  &lt;strong&gt;snice&lt;/strong&gt;, and &lt;strong&gt;skill&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;nohup&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Keeps a command  running even after user logs off. The command will run as a foreground process  unless followed by &lt;/span&gt;&lt;span class="token"&gt;&amp;amp;&lt;/span&gt;. If you use  &lt;strong&gt;nohup&lt;/strong&gt; within a script, consider coupling it with a wait to  avoid creating an orphan or zombie process.&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;pidof&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Identifies  &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;process id (pid)&lt;/span&gt;&lt;/em&gt; of a running  job. Since job control commands, such as kill and &lt;strong&gt;renice&lt;/strong&gt; act on  the &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;pid&lt;/span&gt;&lt;/em&gt; of a process (not its  name), it is sometimes necessary to identify that &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;pid&lt;/span&gt;&lt;/em&gt;. The &lt;strong&gt;pidof&lt;/strong&gt; command  is the approximate counterpart to the $PPID internal variable.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table54" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;pidof xclock&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;880&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-4.  pidof helps kill a process&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table55" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# kill-process.sh&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;NOPROCESS=2&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;process=xxxyyyzzz  # Use nonexistent process.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# For demo purposes only…&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# … don’t want to actually kill any actual process with this script.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# If, for example, you wanted to use this script to logoff the Internet,&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#     process=pppd&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;t=`pidof $process`       # Find pid (process id) of $process.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# The pid is needed by ‘kill’ (can’t ‘kill’ by program name).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;if [ -z “$t” ]           # If process not present, ‘pidof’ returns null.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  echo “Process $process was not running.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  echo “Nothing killed.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  exit $NOPROCESS&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;fi  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;kill $t                  # May need ‘kill -9′ for stubborn process.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Need a check here to see if process allowed itself to be killed.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Perhaps another ” t=`pidof $process` “.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# This entire script could be replaced by&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#    kill $(pidof -x process_name)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# but it would not be as instructive.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;fuser  &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Identifies the  processes (by pid) that are accessing a given file, set of files, or directory.  May also be invoked with the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-k&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt; option, which  kills those processes. This has interesting implications for system security,  especially in scripts preventing unauthorized users from accessing system  services.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;crond&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Administrative  program scheduler, performing such duties as cleaning up and deleting system log  files and updating the &lt;/span&gt;&lt;span class="database"&gt;slocate&lt;/span&gt; database. This  is the superuser version of at (although each user may have their own &lt;span style="font-size: 10pt;"&gt;crontab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; file which can be  changed with the &lt;strong&gt;crontab&lt;/strong&gt; command). It runs as a daemon and  executes scheduled entries from &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/crontab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Process Control and  Booting&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;init&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;init&lt;/strong&gt; command is the parent of all processes. Called in the  final step of a bootup, &lt;strong&gt;init&lt;/strong&gt; determines the runlevel of the  system from &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/inittab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. Invoked by its  alias &lt;strong&gt;telinit&lt;/strong&gt;, and by root only.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;telinit&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Symlinked to  &lt;strong&gt;init&lt;/strong&gt;, this is a means of changing the system runlevel, usually  done for system maintenance or emergency filesystem repairs. Invoked only by  root. This command can be dangerous - be certain you understand it well before  using!&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;runlevel&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Shows the current  and last runlevel, that is, whether the system is halted (runlevel &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;0&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;), in single-user  mode (&lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;1&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;), in multi-user  mode (&lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;2&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; or &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;3&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;), in X Windows  (&lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;5&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;), or rebooting  (&lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;6&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;). This command  accesses the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/run/utmp&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; file.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;halt&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;shutdown&lt;/strong&gt;, &lt;strong&gt;reboot&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Command set to shut  the system down, usually just prior to a power down.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Network&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;ifconfig&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Network interface  configuration and tuning utility. It is most often used at bootup to set up the  interfaces, or to shut them down when rebooting. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table56" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Code snippets from /etc/rc.d/init.d/network&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Check that networking is up.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;[ ${NETWORKING} = “no” ] &amp;amp;&amp;amp; exit 0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;[ -x /sbin/ifconfig ] || exit 0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;for i in $interfaces ; do&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  if ifconfig $i 2&gt;/dev/null | grep -q “UP” &gt;/dev/null 2&gt;&amp;amp;1 ; then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;    action “Shutting down interface $i: ” ./ifdown $i boot&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  fi&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# The GNU-specific “-q” option to “grep” means “quiet”, i.e., producing no output.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Redirecting output to /dev/null is therefore not strictly necessary.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo “Currently active devices:”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;echo `/sbin/ifconfig | grep ^[a-z] | awk ‘{print $1}’`&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#                            ^^^^^  should be quoted to prevent globbing.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  The following also work.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#    echo $(/sbin/ifconfig | awk ‘/^[a-z]/ { print $1 })’&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#    echo $(/sbin/ifconfig | sed -e ’s/ .*//’)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  Thanks, S.C., for additional comments.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;route&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show info about or  make changes to the kernel routing table.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table57" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;route&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; pm3-67.bozosisp *               255.255.255.255 UH       40 0          0 ppp0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; 127.0.0.0       *               255.0.0.0       U        40 0          0 lo&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; default         pm3-67.bozosisp 0.0.0.0         UG       40 0          0 ppp0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;chkconfig&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Check network  configuration. This command lists and manages the network services started at  bootup in the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/rc?.d&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;  directory.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Originally a port  from IRIX to Red Hat Linux, &lt;strong&gt;chkconfig&lt;/strong&gt; may not be part of the  core installation of some Linux flavors.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table58" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;chkconfig –list&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; rwhod           0:off   1:off   2:off   3:off   4:off   5:off   6:off&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; …&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tcpdump&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Network packet  &lt;/span&gt;&lt;span class="quote"&gt;“sniffer”&lt;/span&gt;. This is a tool for analyzing and  troubleshooting traffic on a network by dumping packet headers that match  specified criteria.&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Dump ip packet  traffic between hosts &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;bozoville&lt;/span&gt;&lt;/em&gt; and &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;caduceus&lt;/span&gt;&lt;/em&gt;: &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table59" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;tcpdump ip host bozoville and caduceus&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Of course, the  output of &lt;strong&gt;tcpdump&lt;/strong&gt; can be parsed, using certain of the  previously discussed text processing utilities.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Filesystem&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mount&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Mount a filesystem,  usually on an external device, such as a floppy or CDROM. The file &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/fstab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; provides a handy  listing of available filesystems, partitions, and devices, including options,  that may be automatically or manually mounted. The file &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/mtab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; shows the  currently mounted filesystems and partitions (including the virtual ones, such  as &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/proc&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;).&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mount  -a&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; mounts all  filesystems and partitions listed in &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/fstab&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;, except those with  a &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;noauto&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option. At bootup,  a startup script in &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/rc.d&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; (&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;rc.sysinit&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; or something  similar) invokes this to get everything mounted.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table60" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mount -t iso9660 /dev/cdrom /mnt/cdrom&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Mounts CDROM&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mount /mnt/cdrom&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Shortcut, if /mnt/cdrom listed in /etc/fstab&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This versatile  command can even mount an ordinary file on a block device, and the file will act  as if it were a filesystem. &lt;strong&gt;Mount&lt;/strong&gt; accomplishes that by  associating the file with a loopback device. One application of this is to mount  and examine an ISO9660 image before burning it onto a CDR. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="KILLPROCESS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-5.  Checking a CD image&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table61" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# As root…&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mkdir /mnt/cdtest  # Prepare a mount point, if not already there.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mount -r -t iso9660 -o loop cd-image.iso /mnt/cdtest   # Mount the image.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#                  “-o loop” option equivalent to “losetup /dev/loop0″&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;cd /mnt/cdtest     # Now, check the image.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;ls -alR            # List the files in the directory tree there.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;                   # And so forth.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;umount  &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Unmount a  currently mounted filesystem. Before physically removing a previously mounted  floppy or CDROM disk, the device must be umounted, else filesystem corruption  may result. &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table62" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;umount /mnt/cdrom&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# You may now press the eject button and safely remove the disk.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="display: none; font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table63" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;automount&lt;/strong&gt; utility, if properly installed, can mount and unmount  floppies or CDROM disks as they are accessed or removed. On laptops with  swappable floppy and CDROM drives, this can cause problems,  though.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;sync  &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Forces an  immediate write of all updated data from buffers to hard drive (synchronize  drive with buffers). While not strictly necessary, a sync assures the sys admin  or user that the data just changed will survive a sudden power failure. In the  olden days, a &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;sync; sync&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt; (twice, just to  make absolutely sure) was a useful precautionary measure before a system  reboot.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;At times, you may  wish to force an immediate buffer flush, as when securely deleting a  file&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; or when the lights  begin to flicker.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;losetup&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Sets up and  configures loopback devices.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ISOMOUNTREF"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-6.  Creating a filesystem in a file&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table64" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;SIZE=1000000  # 1 meg&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;head -c $SIZE &lt; /dev/zero &gt; file  # Set up file of designated size.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;losetup /dev/loop0 file           # Set it up as loopback device.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mke2fs /dev/loop0                 # Create filesystem.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mount -o loop /dev/loop0 /mnt     # Mount it.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Thanks, S.C.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;mkswap  &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Creates a swap  partition or file. The swap area must subsequently be enabled with  swapon.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;swapon, swapoff  &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Enable / disable  swap partitition or file. These commands usually take effect at bootup and  shutdown.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mke2fs&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Create a Linux ext2  filesystem. This command must be invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="CREATEFS"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-7.  Adding a new hard drive&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table65" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/bash&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Adding a second hard drive to system.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Software configuration. Assumes hardware already mounted.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# From an article by the author of this document.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# in issue #38 of “Linux Gazette”, http://www.linuxgazette.com.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;ROOT_UID=0     # This script must be run as root.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;E_NOTROOT=67   # Non-root exit error.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;if [ “$UID” -ne “$ROOT_UID” ]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  echo “Must be root to run this script.”&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  exit $E_NOTROOT&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;fi  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Use with extreme caution!&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# If something goes wrong, you may wipe out your current filesystem.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;NEWDISK=/dev/hdb         # Assumes /dev/hdb vacant. Check!&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;MOUNTPOINT=/mnt/newdisk  # Or choose another mount point.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;fdisk $NEWDISK&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mke2fs -cv $NEWDISK1   # Check for bad blocks &amp;amp; verbose output.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#  Note:    /dev/hdb1, *not* /dev/hdb!&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;mkdir $MOUNTPOINT&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;chmod 777 $MOUNTPOINT  # Makes new drive accessible to all users.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Now, test…&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# mount -t ext2 /dev/hdb1 /mnt/newdisk&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Try creating a directory.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# If it works, umount it, and proceed.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Final step:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Add the following line to /etc/fstab.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# /dev/hdb1  /mnt/newdisk  ext2  defaults  1 1&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;exit 0&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tune2fs&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Tune ext2  filesystem. May be used to change filesystem parameters, such as maximum mount  count. This must be invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table66" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;WARNING&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This is an  extremely dangerous command. Use it at your own risk, as you may inadvertently  destroy your filesystem. &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;dumpe2fs&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Dump (list to  &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;stdout&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;) very verbose  filesystem info. This must be invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table67" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root# &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;dumpe2fs /dev/hda7 | grep ‘ount count’&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;dumpe2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Mount count:              6&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; Maximum mount count:      20&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;hdparm&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List or change hard  disk parameters. This command must be invoked as root, and it may be dangerous  if misused.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;fdisk&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Create or change a  partition table on a storage device, usually a hard drive. This command must be  invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table68" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;WARNING&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Use this command  with extreme caution. If something goes wrong, you may destroy an existing  filesystem.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;fsck&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;e2fsck&lt;/strong&gt;, &lt;strong&gt;debugfs&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Filesystem check,  repair, and debug command set.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;fsck&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;: a front end for  checking a UNIX filesystem (may invoke other utilities). The actual filesystem  type generally defaults to ext2.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;e2fsck&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;: ext2 filesystem  checker.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;debugfs&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;: ext2 filesystem  debugger. One of the uses of this versatile, but dangerous command is to  (attempt to) recover deleted files. For advanced users only!&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table69" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: red none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;CAUTION&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;All of these should  be invoked as root, and they can damage or destroy a filesystem if  misused.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;badblocks&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Checks for bad  blocks (physical media flaws) on a storage device. This command finds use when  formatting a newly installed hard drive or testing the integrity of backup  media. As an example, &lt;strong&gt;badblocks /dev/fd0&lt;/strong&gt; tests a floppy  disk.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;badblocks&lt;/strong&gt; command may be invoked destructively (overwrite all  data) or in non-destructive read-only mode. If root user owns the device to be  tested, as is generally the case, then root must invoke this command.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mkbootdisk&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Creates a boot  floppy which can be used to bring up the system if, for example, the MBR (master  boot record) becomes corrupted. The &lt;strong&gt;mkbootdisk&lt;/strong&gt; command is  actually a Bash script, written by Erik Troan, in the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/sbin&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;  directory.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;chroot&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;CHange ROOT  directory. Normally commands are fetched from $PATH, relative to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;, the default root  directory. This changes the root directory to a different one (and also changes  the working directory to there). This is useful for security purposes, for  instance when the system administrator wishes to restrict certain users, such as  those telnetting in, to a secured portion of the filesystem (this is sometimes  referred to as confining a guest user to a &lt;/span&gt;&lt;span class="quote"&gt;“chroot  jail”&lt;/span&gt;). Note that after a &lt;strong&gt;chroot&lt;/strong&gt;, the execution path for  system binaries is no longer valid.&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;A  &lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;chroot /opt&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; would cause  references to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/usr/bin&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; to be translated  to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/opt/usr/bin&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;. Likewise,  &lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;chroot /aaa/bbb  /bin/ls&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; would redirect  future instances of &lt;strong&gt;ls&lt;/strong&gt; to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/aaa/bbb&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; as the base  directory, rather than &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; as is normally the  case. An &lt;strong&gt;alias XX ‘chroot /aaa/bbb ls’&lt;/strong&gt; in a user’s &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;~/.bashrc&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; effectively  restricts which portion of the filesystem she may run command &lt;/span&gt;&lt;span class="quote"&gt;“XX”&lt;/span&gt; on.&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;chroot&lt;/strong&gt; command is also handy when running from an emergency  boot floppy (&lt;strong&gt;chroot&lt;/strong&gt; to &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/dev/fd0&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;), or as an option  to &lt;strong&gt;lilo&lt;/strong&gt; when recovering from a system crash. Other uses include  installation from a different filesystem (an rpm option) or running a readonly  filesystem from a CD ROM. Invoke only as root, and use with care.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table70" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: red none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;CAUTION&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;It  might be necessary to copy certain system files to a &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;chrooted&lt;/span&gt;&lt;/em&gt; directory, since the normal  &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;$PATH&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; can no longer be  relied upon.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lockfile&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;a name="ADDDRV"&gt;&lt;/a&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This utility is  part of the &lt;strong&gt;procmail&lt;/strong&gt; package (&lt;/span&gt;&lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.procmail.org/" target="_top"&gt;&lt;strong&gt;www.procmail.org&lt;/strong&gt;&lt;/a&gt;). It creates a &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;lock file&lt;/span&gt;&lt;/em&gt;, a semaphore file that  controls access to a file, device, or resource. The lock file serves as a flag  that this particular file, device, or resource is in use by a particular process  (&lt;span class="quote"&gt;“busy”&lt;/span&gt;), and this permits only restricted access (or  no access) to other processes.&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Lock files are used  in such applications as protecting system mail folders from simultaneously being  changed by multiple users, indicating that a modem port is being accessed, and  showing that an instance of &lt;/span&gt;&lt;span class="application"&gt;Netscape&lt;/span&gt; is  using its cache. Scripts may check for the existence of a lock file created by a  certain process to check if that process is running. Note that if a script  attempts create a lock file that already exists, the script will likely  hang.&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Normally,  applications create and check for lock files in the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/var/lock&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; directory. A  script can test for the presence of a lock file by something like the following.  &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table71" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;appname=xyzip&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Application “xyzip” created lock file “/var/lock/xyzip.lock”.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;if [ -e “/var/lock/$appname.lock ]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;  …&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;mknod&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Creates block or  character device files (may be necessary when installing new hardware on the  system).&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;tmpwatch&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Automatically  deletes files which have not been accessed within a specified period of time.  Usually invoked by crond to remove stale log files.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;MAKEDEV&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Utility for  creating device files. It must be run as root, and in the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/dev&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; directory.  &lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table72" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;root# &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;./MAKEDEV&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This is a sort of  advanced version of &lt;strong&gt;mknod&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Backup&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;dump&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;,  &lt;strong&gt;restore&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The  &lt;strong&gt;dump&lt;/strong&gt; command is an elaborate filesystem backup utility,  generally used on larger installations and networks. It reads raw disk  partitions and writes a backup file in a binary format. Files to be backed up  may be saved to a variety of storage media, including disks and tape drives. The  &lt;strong&gt;restore&lt;/strong&gt; command restores backups made with  &lt;strong&gt;dump&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;fdformat&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Perform a low-level  format on a floppy disk.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;System  Resources&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;ulimit&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Sets an &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;upper limit&lt;/span&gt;&lt;/em&gt; on system resources.  Usually invoked with the &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-f&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option, which sets  a limit on file size (&lt;strong&gt;ulimit -f 1000&lt;/strong&gt; limits files to 1 meg  maximum). The &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;-t&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; option limits the  coredump size (&lt;strong&gt;ulimit -c 0&lt;/strong&gt; eliminates coredumps). Normally, the  value of &lt;strong&gt;ulimit&lt;/strong&gt; would be set in &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/profile&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; and/or  &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;~/.bash_profile&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;umask&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;User file creation  MASK. Limit the default file attributes for a particular user. All files created  by that user take on the attributes specified by &lt;strong&gt;umask&lt;/strong&gt;. The  (octal) value passed to &lt;strong&gt;umask&lt;/strong&gt; defines the file permissions  &lt;em&gt;&lt;span style="font-family: Verdana;"&gt;disabled&lt;/span&gt;&lt;/em&gt;. For example,  &lt;strong&gt;umask 022&lt;/strong&gt; ensures that new files will have at most 755  permissions (777 NAND 022). &lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.performancewiki.com/common-linux-commands.html#FTN.AEN11249#FTN.AEN11249"&gt;&lt;strong&gt;[6]&lt;/strong&gt;&lt;/a&gt;  Of course, the user may later change the attributes of particular files with  chmod. The usual practice is to set the value of &lt;strong&gt;umask&lt;/strong&gt; in  &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;/etc/profile&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; and/or  &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;~/.bash_profile&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;rdev&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Get info about or  make changes to root device, swap space, or video mode. The functionality of  &lt;strong&gt;rdev&lt;/strong&gt; has generally been taken over by &lt;strong&gt;lilo&lt;/strong&gt;,  but &lt;strong&gt;rdev&lt;/strong&gt; remains useful for setting up a ram disk. This is  another dangerous command, if misused. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Modules&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;lsmod&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List installed  kernel modules.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table73" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;lsmod&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;Module                  Size  Used by&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; autofs                  9456   2 (autoclean)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; opl3                   11376   0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; serial_cs               5456   0 (unused)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; sb                     34752   0&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; uart401                 6384   0 [sb]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; sound                  58368   0 [opl3 sb uart401]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; soundlow                 464   0 [sound]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; soundcore               2800   6 [sb sound]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; ds                      6448   2 [serial_cs]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; i82365                 22928   2&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; pcmcia_core            45984   0 [serial_cs ds i82365]&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;              &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="display: none; font-size: 8.5pt; color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table74" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Doing a &lt;strong&gt;cat  /proc/modules&lt;/strong&gt; gives the same  information.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;insmod&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Force installation  of a kernel module (use &lt;strong&gt;modprobe&lt;/strong&gt; instead, when possible). Must  be invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;rmmod&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Force unloading of  a kernel module. Must be invoked as root.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;modprobe&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Module loader that  is normally invoked automatically in a startup script. Must be invoked as  root.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;depmod&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Creates module  dependency file, usually invoked from startup script.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Miscellaneous&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;env&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Runs a program or  script with certain environmental variables set or changed (without changing the  overall system environment). The &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;[varname=xxx]&lt;/span&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; permits changing  the environmental variable &lt;/span&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="font-size: 10pt; color: black;"&gt;varname&lt;/span&gt;&lt;/tt&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; for the duration  of the script. With no options specified, this command lists all the  environmental variable settings.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table75" style="margin-left: 0.5in;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" colspan="2" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NOTE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;In  Bash and other Bourne shell derivatives, it is possible to set variables in a  single command’s environment. &lt;/span&gt;  &lt;table class="MsoNormalTable" id="table76" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;var1=value1 var2=value2 commandXXX&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# $var1 and $var2 set in the environment of ‘commandXXX’ only.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt; width: 25px;" valign="top"&gt; &lt;p class="MsoNormal"&gt;&lt;span style="background: yellow none repeat scroll 0% 50%; font-size: 8.5pt; color: black; font-family: Verdana; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;TIP&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;td style="padding: 0.75pt;" colspan="2" valign="top"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;The first line of a  script (the &lt;/span&gt;&lt;span class="quote"&gt;“sha-bang”&lt;/span&gt; line) may use  &lt;strong&gt;env&lt;/strong&gt; when the path to the shell or interpreter is unknown.  &lt;table class="MsoNormalTable" id="table77" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#! /usr/bin/env perl&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;print “This Perl script will run,n”;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;print “even when I don’t know where to find Perl.n”;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Good for portable cross-platform scripts,&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# where the Perl binaries may not be in the expected place.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Thanks, S.C.&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;ldd&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Show shared lib  dependencies for an executable file.&lt;/span&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table78" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;tt style="font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;bash$ &lt;/span&gt;&lt;/tt&gt;&lt;strong&gt;&lt;span style="color: black;"&gt;ldd /bin/ls&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;libc.so.6 =&gt; /lib/libc.so.6 (0×4000c000)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;/lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0×80000000)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;strip&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Remove the  debugging symbolic references from an executable binary. This decreases its  size, but makes debugging it impossible.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;This command often  occurs in a Makefile, but rarely in a shell script.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;nm&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;List symbols in an  unstripped compiled binary.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;rdist&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Remote distribution  client: synchronizes, clones, or backs up a file system on a remote  server.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;Using our  knowledge of administrative commands, let us examine a system script. One of the  shortest and simplest to understand scripts is &lt;strong&gt;killall&lt;/strong&gt;, used to  suspend running processes at system shutdown.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="EX55"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;Example 13-8.  killall, from &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;/etc/rc.d/init.d&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="EX55"&gt;&lt;/a&gt;&lt;/p&gt; &lt;table class="MsoNormalTable" id="table79" style="background: rgb(224, 224, 224) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%" border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding: 0.75pt;" valign="top"&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;#!/bin/sh&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# –&gt; Comments added by the author of this document marked by “# –&gt;”.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# –&gt; This is part of the ‘rc’ script package&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# –&gt; by Miquel van Smoorenburg, &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# –&gt; This particular script seems to be Red Hat specific&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# –&gt; (may not be present in other distributions).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# Bring down all unneeded services that are still running (there shouldn’t &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;# be any, so this is just a sanity check)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;for i in /var/lock/subsys/*; do&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; Standard for/in loop, but since “do” is on same line,&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; it is necessary to add “;”.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # Check if the script is there.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        [ ! -f $i ] &amp;amp;&amp;amp; continue&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; This is a clever use of an “and list”, equivalent to:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; if [ ! -f “$i” ]; then continue&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # Get the subsystem name.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        subsys=${i#/var/lock/subsys/}&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; Match variable name, which, in this case, is the file name.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; This is the exact equivalent of subsys=`basename $i`.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt;  It gets it from the lock file name (if there is a lock file,&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt;+ that’s proof the process has been running).&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt;  See the “lockfile” entry, above.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # Bring the subsystem down.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        if [ -f /etc/rc.d/init.d/$subsys.init ]; then&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;            /etc/rc.d/init.d/$subsys.init stop&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;            /etc/rc.d/init.d/$subsys stop&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; Suspend running jobs and daemons&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        # –&gt; using the ’stop’ shell builtin.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;        fi&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0in 0in 0pt; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: black;"&gt;done&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a name="EX55"&gt;&lt;/a&gt;&lt;a name="EX55"&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size: 8.5pt; color: rgb(34, 85, 102); font-family: Verdana;"&gt;More at  &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8.5pt; color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;a style="font-weight: bold; color: rgb(34, 85, 102); text-decoration: underline;" href="http://www.die.net/doc/linux/man/"&gt;&lt;strong&gt;http://www.die.net/doc/linux/man/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2662394434197666983?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2662394434197666983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/common-linux-commands-by-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2662394434197666983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2662394434197666983'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/common-linux-commands-by-examples.html' title='Common Linux Commands By Examples'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-5219106398403727260</id><published>2009-02-05T17:22:00.000-08:00</published><updated>2009-02-05T17:24:45.845-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fc'/><category scheme='http://www.blogger.com/atom/ns#' term='gigabit'/><category scheme='http://www.blogger.com/atom/ns#' term='throughput'/><category scheme='http://www.blogger.com/atom/ns#' term='storage'/><category scheme='http://www.blogger.com/atom/ns#' term='fibre channel'/><title type='text'>2 Gigabit FC Card - How Fast is It, Really?</title><content type='html'>&lt;span style="font-size:85%;"&gt;Common misunderstandings:&lt;br /&gt;&lt;br /&gt;“If I buy 2 Gigabit HBAs I will get 2 Gigabytes of throughput, that’s more than enough throughput for my 400 MB/s application”&lt;br /&gt;&lt;br /&gt;“I only need 2 disks to store my 1 TB database, now that we have 500GB disk drives are available!”&lt;br /&gt;&lt;br /&gt;The first misunderstanding is not just about bits vs bytes, its understanding the context of when and where the [unit of measurement] bits vs bytes is used. For example, in the world of networks&lt;br /&gt;(Ethernet, Fibre Channel, etc.) bits is a common unit of measurement, whereas bytes is used to describe throughput outside the network; i.e., disks or HBAs. Just be aware of the unit measurement and the context of its use.&lt;br /&gt;&lt;br /&gt;To convert 2Gbits into Mbytes :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;2Gbits = (2* 1024 * 1024 * 1024) / (1024* 1024) / 8bits&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;= 2147483648 / 1048576&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;= 2048 / 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;= 256Mbytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;The second misunderstanding has to do with sizing for capacity instead of sizing for throughput. Always size for throughput.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-5219106398403727260?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/5219106398403727260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/2-gigabit-fc-card-how-fast-is-it-really.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/5219106398403727260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/5219106398403727260'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/2-gigabit-fc-card-how-fast-is-it-really.html' title='2 Gigabit FC Card - How Fast is It, Really?'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-7090009985494248499</id><published>2009-02-04T23:58:00.001-08:00</published><updated>2009-02-05T00:25:13.276-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='cpu'/><category scheme='http://www.blogger.com/atom/ns#' term='monitor'/><category scheme='http://www.blogger.com/atom/ns#' term='sar'/><category scheme='http://www.blogger.com/atom/ns#' term='busy'/><title type='text'>3 Easy Steps to Use 'sar' to Log and Analyze System Performance</title><content type='html'>&lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;Commands below are for Linux, but the idea works everywhere ’sadc’ is  available.&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;1) Start&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;/usr/lib/sa/sadc&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;Example&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;machine1:~ # /usr/lib/sa/sadc 2 7200 sadc.outfile&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;this logs SAR data for 4 hours.&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;2) Stop logging, do&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;‘killall sadc’ or ‘kill’&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;3) Usage of sar. Creating report with all options&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;sar -A -f&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;Example&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;machine1:~ # sar -A -f sadc.outfile &gt; sar.outfile&lt;br /&gt;machine1:~ # cat  sar.outfile&lt;br /&gt;Linux 2.4.21-75-default (machine1) 12/03/03&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 proc/s&lt;br /&gt;Average: 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 cswch/s&lt;br /&gt;Average: 38.50&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 CPU %user %nice %system %idle&lt;br /&gt;Average: all 0.06 0.00 0.00  99.94&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 INTR intr/s&lt;br /&gt;Average: sum 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 pgpgin/s pgpgout/s activepg inadtypg inaclnpg inatarpg&lt;br /&gt;Average:  0.00 16.00 9931 0 0 0&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 pswpin/s pswpout/s&lt;br /&gt;Average: 0.00 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 tps rtps wtps bread/s bwrtn/s&lt;br /&gt;Average: 0.75 0.00 0.75 0.00  32.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 CPU %user %nice %system %idle&lt;br /&gt;Average: 0 0.00 0.00 0.00  100.00&lt;br /&gt;Average: 1 0.00 0.00 0.00 100.00&lt;br /&gt;Average: 2 0.00 0.00 0.00  100.00&lt;br /&gt;Average: 3 0.25 0.00 0.00 99.75&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 frmpg/s shmpg/s bufpg/s campg/s&lt;br /&gt;Average: -0.50 0.00 0.50 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 kbmemfree kbmemused %memused kbmemshrd kbbuffers kbcached kbswpfree  kbswpused %swpused&lt;br /&gt;Average: 8860 114108 92.79 0 21996 42764 2097112 0  0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 dentunusd file-sz %file-sz inode-sz super-sz %super-sz dquot-sz  %dquot-sz rtsig-sz %rtsig-sz&lt;br /&gt;Average: 10558 719 5.49 7376 0 0.00 0 0.00 0  0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 Iface rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s  rxmcst/s&lt;br /&gt;Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;br /&gt;Average: sit0 0.00  0.00 0.00 0.00 0.00 0.00 0.00&lt;br /&gt;Average: eth1 0.00 0.00 0.00 0.00 0.00 0.00  0.00&lt;br /&gt;Average: eth0 2.00 0.50 381.50 66.00 0.00 0.00 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 Iface rxerr/s txerr/s coll/s rxdrop/s txdrop/s txcarr/s rxfram/s  rxfifo/s txfifo/s&lt;br /&gt;Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00  0.00&lt;br /&gt;Average: sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;br /&gt;Average:  eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;br /&gt;Average: eth0 0.00 0.00  0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 totsck tcpsck udpsck rawsck ip-frag&lt;br /&gt;Average: 116 4 2 0 0&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 runq-sz plist-sz ldavg-1 ldavg-5&lt;br /&gt;Average: 0 43 0.00 0.01&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;13:35:34 DEV tps blks/s&lt;br /&gt;Average: dev94-0 0.75 32.00 &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-7090009985494248499?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/7090009985494248499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/3-easy-steps-to-use-sar-to-log-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7090009985494248499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7090009985494248499'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/3-easy-steps-to-use-sar-to-log-and.html' title='3 Easy Steps to Use &apos;sar&apos; to Log and Analyze System Performance'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2329468127768641391</id><published>2009-02-04T23:54:00.000-08:00</published><updated>2009-02-04T23:57:20.815-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web server'/><category scheme='http://www.blogger.com/atom/ns#' term='monitor'/><category scheme='http://www.blogger.com/atom/ns#' term='http server'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><category scheme='http://www.blogger.com/atom/ns#' term='status'/><title type='text'>Check Web Server Status from Browser</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://performancewiki.com/img/http-status.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 593px; height: 589px;" src="http://performancewiki.com/img/http-status.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Sometimes it is easier and quick to get status on a Web Server from a browser  - you can be anywhere and know what is going on with the server. Of course, this  works only if you are on a firewall protected network.&lt;/span&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;The IBM HTTP Server server-status page is available on all supported IBM HTTP  Server platforms. It shows performance data on a Web page in HTML format.  Statistics include &lt;em&gt;&lt;strong&gt;total accesses, requests/sec, data(KB)/sec, total  traffic (MB) since last restart&lt;/strong&gt;&lt;/em&gt;, etc.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;To make this work, perform the following steps to activate the server-status  page:&lt;br /&gt;1. Open the IBM HTTP Server file httpd.conf in an editor.&lt;br /&gt;2. Remove  the comment character “#” from the following lines:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;#LoadModule status_module modules/mod_status.so&lt;br /&gt;#&lt;br /&gt;# SetHandler  server-status&lt;br /&gt;# Order deny,allow&lt;br /&gt;# Deny from all&lt;br /&gt;# Allow from  .example.com&lt;br /&gt;#&lt;br /&gt;3. Customize the “.example.com” in the sample configuration  to match your source workstation reverse DNS entry so you’re allowed to access  the page. In our example this must be changed to:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Allow from .pw.com [replace with your own domain name]&lt;br /&gt;4. Save the changes  and restart the IBM HTTP Server.&lt;br /&gt;5. Open the URL http:///server-status in a  Web browser, and click Refresh to update the status.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;If your browser supports refresh, you can also use the URL  http:///server-status?refresh=5 to refresh every 5 seconds.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;As shown in the following image, you can see (along with additional  information) the number of requests currently being processed, and the number of  idle servers.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2329468127768641391?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2329468127768641391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/check-web-server-status-from-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2329468127768641391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2329468127768641391'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/check-web-server-status-from-browser.html' title='Check Web Server Status from Browser'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-1757832760037645893</id><published>2009-02-04T23:50:00.000-08:00</published><updated>2009-02-04T23:53:55.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='disk io'/><category scheme='http://www.blogger.com/atom/ns#' term='stats'/><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>How much IO is Imposed by System (Oracle)</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;Don’t forget to add extra IO imposed by users of the database. For example,  to determine how much extra I/O will be imposed on the system when the new load  is put into place. For example, if more users or reports will be added,  determine how much I/O these reports (or a typical user) currently does, then  extrapolate for the estimated growth. The query below will assist in getting  some of this data.&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;SELECT a.sid,&lt;br /&gt;a.statistic#,&lt;br /&gt;SUBSTR(b.name,1,40)  name,&lt;br /&gt;a.value&lt;br /&gt;FROM v$sesstat a,&lt;br /&gt;v$statname b,&lt;br /&gt;v$session se&lt;br /&gt;WHERE  se.audsid = (select userenv(’sessionid’) from dual)&lt;br /&gt;AND a.statistic# =  b.statistic#&lt;br /&gt;AND se.sid = a.sid&lt;br /&gt;AND b.name in (’physical read total IO  requests’,'physical read total bytes’,'physical write total  IO&lt;br /&gt;requests’,'physical write total bytes’)&lt;br /&gt;ORDER BY b.class,  b.name&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-1757832760037645893?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/1757832760037645893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/oracle-query-to-determine-io-imposed-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1757832760037645893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1757832760037645893'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/oracle-query-to-determine-io-imposed-by.html' title='How much IO is Imposed by System (Oracle)'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-7621858953929178822</id><published>2009-02-04T23:44:00.000-08:00</published><updated>2009-02-04T23:49:54.440-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='device'/><category scheme='http://www.blogger.com/atom/ns#' term='traffic'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='terms'/><category scheme='http://www.blogger.com/atom/ns#' term='definition'/><category scheme='http://www.blogger.com/atom/ns#' term='latency'/><category scheme='http://www.blogger.com/atom/ns#' term='throughput'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>What is Throughput?</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;Saw this definition from one of the Oracle OpenWorld sessions, thought it was  pretty clear and concise:&lt;br /&gt;&lt;strong&gt;Throughput&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The measure of the transfer of bits across the media over a given period of  time. Commonly used in discussing data transfer rates  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Due to a number of factors, throughput usually does not match the specified  bandwidth. Factors include: &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The amount and type of traffic on the network  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The number of network devices encountered in the network path being measured  (path latency). &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;In any network (including FC networks), throughput cannot be faster than the  slowest link of the path from source to destination. Even if all or most of the  segments have high bandwidth, it will only take one segment in the path with low  throughput to create a bottleneck to the throughput of the entire network.  Bandwidth is the amount of information it is physically possible to send through  the media of choice. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-7621858953929178822?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/7621858953929178822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/what-is-throughput.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7621858953929178822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/7621858953929178822'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/what-is-throughput.html' title='What is Throughput?'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2074324662542149414</id><published>2009-02-04T23:34:00.000-08:00</published><updated>2009-02-04T23:43:33.018-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='disk io'/><category scheme='http://www.blogger.com/atom/ns#' term='cpu'/><category scheme='http://www.blogger.com/atom/ns#' term='tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='method'/><category scheme='http://www.blogger.com/atom/ns#' term='slow response time'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='bandwidth'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Slow response time? Start here!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.performancewiki.com/"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 323px; height: 526px;" src="http://www.performancewiki.com/img/performance-analysis-flowchart.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Simple &amp;amp; Effective Performance Tips&lt;/strong&gt; - Your end users complain  that your Web pages load slowly and they don’t intend to wait! So you need to  dust off your system topology diagram and understand which servers user traffic  travels. Then you need to &lt;a href="http://www.performancewiki.com/cpu-monitoring.html"&gt;determine  if CPUs are busy&lt;/a&gt; on these systems, if they are busy (i.e., above 85%), you  need to &lt;a href="http://www.performancewiki.com/cpu-tuning.html"&gt;track  down which process is using the CPU cycles&lt;/a&gt;; if CPU seems fine (i.e., under  85%), then ask yourself &lt;a href="http://www.performancewiki.com/memory-monitoring.html"&gt;if  memory is running out&lt;/a&gt;? If your system is memory-bound, you could be paging  to disks - disk I/O is a performance killer. If memory is the issue, &lt;a href="http://www.performancewiki.com/memory-tuning.html"&gt;find  out which process(es) are hogging memory&lt;/a&gt; - and they could be abusing memory  too (e.g., &lt;a href="http://www.performancewiki.com/memory-leak-analysis.html"&gt;memory  leak&lt;/a&gt;, or loading large Word files into memory for processing); if your  systems have pletty of free memory, then you need to check &lt;a href="http://www.performancewiki.com/diskio-monitoring.html"&gt;if  your disk I/O is high&lt;/a&gt;. If disk I/O is high, you need to &lt;a href="http://performancewiki.com/wordpress/expert-help/disk-io-analysis-determining-io-bottlenecks/"&gt;find  out which process or thread is writing to and reading from the disk&lt;/a&gt;!  Finally, if all the above checked out fine, ask yourself, &lt;a href="http://www.performancewiki.com/network-monitoring.html"&gt;if  network bandwidth is maxed out&lt;/a&gt;: traffic is so high that responses from your  Web site simply cannot push through the thin network “pipe”. But ask yourself,  &lt;a href="http://www.performancewiki.com/network-usage-analysis.html"&gt;is  your application supposed to push that much data&lt;/a&gt;?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2074324662542149414?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2074324662542149414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/slow-response-time-start-here.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2074324662542149414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2074324662542149414'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/slow-response-time-start-here.html' title='Slow response time? Start here!'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-1971241511198552335</id><published>2009-02-04T23:31:00.000-08:00</published><updated>2009-02-04T23:32:47.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='Application server'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><category scheme='http://www.blogger.com/atom/ns#' term='optimize'/><category scheme='http://www.blogger.com/atom/ns#' term='aix'/><title type='text'>Tuning AIX systems for WebSphere Application Server 6.0.x</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;IBM recommends a number of configuration changes and variables you can set to  tune the performance of Websphere to suit your needs. Because the AIX operating  system is not a WebSphere Application Server product, be aware that it can  change and results can vary.&lt;/span&gt;&lt;/p&gt; &lt;h4 class="sectiontitle"&gt;&lt;span style="font-size:85%;"&gt;Procedure&lt;/span&gt;&lt;/h4&gt; &lt;div class="p"&gt;&lt;span style="font-size:85%;"&gt;Change the following configuration settings or variables according  to your needs: &lt;/span&gt; &lt;ul&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;TCP_TIMEWAIT&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the time that must elapse before  TCP/IP can release a closed connection and reuse its resources. This interval  between closure and release is known as the TIME_WAIT state or twice the maximum  segment lifetime (2MSL) state. During this time, reopening the connection to the  client and server costs less than establishing a new connection. By reducing the  value of this entry, TCP/IP can release closed connections faster, providing  more resources for new connections. Adjust this parameter, if the running  application requires rapid release or the creation of new connections, or if a  low throughput occurs due to many connections sitting in the TIME_WAIT state.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;&lt;/span&gt;  &lt;div class="p"&gt;&lt;span style="font-size:85%;"&gt;Issue the following command to set TCP_TIMEWAIT state to 15  seconds: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;/usr/sbin/no –o tcp_timewait =1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;AIX operating systems with DB2&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Separating your DB2 log files from the  physical database files can boost performance. You can also separate the log and  the database files from the drive that contains the Journaled File System (JFS)  service. AIX uses specific volume groups and file systems for the JFS logging.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Use the AIX filemon utility to view all  the file system input and output and to strategically select the file system for  the DB2 log files. Set the DB2 log location according to the &lt;a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/rprf_db2parameters.html"&gt;DB2  tuning parameters &lt;/a&gt;topic.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value: &lt;/strong&gt;The default location for the DB2 log files  is often the same disk drive where the database tables are stored.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; Move the files to a disk that is  separate from the DB2 data and has the minimum input or output activity.  &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;AIX file descriptors (ulimit)&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Specifies the various restrictions on resource  usage on the user account. The &lt;span class="cmdname"&gt;ulimit -a&lt;/span&gt; command  displays all the ulimit limits. The &lt;span class="cmdname"&gt;ulimit -a&lt;/span&gt; command  specifies only the number of open files that are permitted. The default number  of open files setting (2000) is typically sufficient for most applications. If  the value set for this parameter is too low, errors might occur when opening  files or establishing connections. Because this value limits the number of file  descriptors that a server process might open, a value that is too low prevents  optimum performance.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Perform the following steps to change  the open file limit to 10,000 files:  &lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Open the command window. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Edit the &lt;samp class="codeph"&gt;/etc/security/limits&lt;/samp&gt; file. Add the  following lines to the user account that the WebSphere Application Server  process runs on: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;nofiles =  10000&lt;br /&gt;nofiles_hard = 10000&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Save the changes.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Restart your AIX system.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;To verify the result, type the &lt;span class="cmdname"&gt;ulimit -a&lt;/span&gt; command  on the command line. For example, type &lt;span class="cmdname"&gt;# ulimit -a&lt;/span&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; For the AIX operating system, the default  setting is &lt;tt&gt;2000&lt;/tt&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; The value is application dependent.  Increasing the ulimit file descriptor limits might improve performance.  Increasing some of the other limits might be needed depending on your  application. Any changes to the data or stack ulimits should ensure that  data+stack &lt;&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;AIX TCP_KEEPIDLE &lt;/strong&gt;&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; The keepAlive packet ensures that a connection  stays in an active/ESTABLISHED state.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Use the &lt;strong&gt;no&lt;/strong&gt; command to  determine the current value or to set the value. The change is effective until  the next time you restart the machine. To permanently change the value, add the  &lt;strong&gt;no&lt;/strong&gt; command to the &lt;tt&gt;/etc/rc.net&lt;/tt&gt; directory. For example: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;no -o tcp_keepidle=600&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;14400&lt;/tt&gt; half seconds (2 hours).  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;600&lt;/tt&gt; half seconds (5 minutes).  &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;TCP_KEEPINTVL&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Specifies the interval between packets that  are sent to validate the connection.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Use the following command to set the  value to &lt;tt&gt;5&lt;/tt&gt; seconds: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;no -o tcp_keepintvl=10&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;150(1/2 seconds)&lt;/tt&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;10(1/2 seconds)&lt;/tt&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;TCP_KEEPINIT&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Specifies the initial timeout value for TCP  connection.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Use the following command to set the  value to &lt;tt&gt;20&lt;/tt&gt; seconds: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;no -o tcp_keepinit=40&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;150(1/2 seconds)&lt;/tt&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;40(1/2 seconds)&lt;/tt&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Allocating large pages (16 MB) for Java virtual  machines heap &lt;/strong&gt;&lt;/span&gt; &lt;div class="p"&gt;&lt;span style="font-size:85%;"&gt;Some applications require a very large heap for optimal  performance. Reduce the CPU overhead of managing a large heap by using large  page support that is provided by the CPU and the operating system. The following  steps allocate 4 GB of RAM as large pages (16 MB): &lt;/span&gt; &lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;As root user, run the following commands to reserve 4 GB of large page: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;vmo  -r  -o  lgpg_regions=256  -o lgpg_size=16777216&lt;br /&gt;bosboot  -ad  /dev/ipldevice&lt;br /&gt;reboot   -q&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;After reboot, run the following command to enable large page support on the  AIX operating system: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;vmo -p -o  v_pinshm=1&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;As root user, add the following capabilities for the user: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;chuser  capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE  $USER&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Add the &lt;kbd class="userinput"&gt;-Xlp&lt;/kbd&gt; Java options to the Java command.  &lt;/span&gt;&lt;ol type="a"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Click &lt;span class="uicontrol"&gt;Servers&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Application Servers&lt;/span&gt; &gt; &lt;var class="varname"&gt;server_name&lt;/var&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Under &lt;span class="uicontrol"&gt;Server Infrastructure&lt;/span&gt;, click &lt;span class="uicontrol"&gt;Java and Process Management&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Process Definition&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Java  Virtual Machine&lt;/span&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In the &lt;span class="uicontrol"&gt;Generic JVM Argument&lt;/span&gt; field, add &lt;kbd class="userinput"&gt;-Xlp&lt;/kbd&gt;. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Add the &lt;kbd class="userinput"&gt;EXTSHM&lt;/kbd&gt; custom property and set to &lt;kbd class="userinput"&gt;OFF&lt;/kbd&gt;.  &lt;/span&gt;&lt;ol type="a"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Click &lt;span class="uicontrol"&gt;Servers&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Application Servers&lt;/span&gt; &gt; &lt;var class="varname"&gt;server_name&lt;/var&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Under &lt;span class="uicontrol"&gt;Server Infrastructure&lt;/span&gt;, click &lt;span class="uicontrol"&gt;Java and Process Management&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Process Definition&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;Custom  properties&lt;/span&gt; &gt; &lt;span class="uicontrol"&gt;New&lt;/span&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In the &lt;span class="uicontrol"&gt;Name&lt;/span&gt; field, enter &lt;kbd class="userinput"&gt;EXTSHM&lt;/kbd&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In the &lt;span class="uicontrol"&gt;Value&lt;/span&gt; field, enter &lt;kbd class="userinput"&gt;OFF&lt;/kbd&gt;. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Validate large page support is used with the following command: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;vmstat  -l  1&lt;/span&gt;&lt;/pre&gt; &lt;div class="note"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="notetitle"&gt;Note:&lt;/span&gt; The “alp” column is non-zero  when the application is running.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;There are several concerns when enabling large pages, which can cause serious  events to occur on the machine when large pages are enabled. For more  information on AIX large pages, see the “Considerations for using large pages”  section at the following address: &lt;a href="http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/large_page_ovw.htm" target="_blank"&gt;http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/large_page_ovw.htm&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;If you do not want to use the large pages option, there is also a medium page  option. The medium page size option, which is similar, and has close to the same  performance gains as large pages. However, it does not involve the problems of  reserving physical memory for a specific user or process. For more information,  see the -Xlp64k option in the &lt;a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/tprf_tunejvm.html"&gt;Tuning  Java virtual machines&lt;/a&gt; topic. &lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Other AIX information &lt;/strong&gt;&lt;/span&gt; &lt;div class="p"&gt;&lt;span style="font-size:85%;"&gt;Consider the other AIX operating system settings that are not  within the scope of this document. You can adjust the following additional  settings: &lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Adapter transmit and receive queue  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;TCP/IP socket buffer  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;IP protocol mbuf pool performance  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Update file descriptors  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Update the scheduler &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-1971241511198552335?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/1971241511198552335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-aix-systems-for-websphere.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1971241511198552335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/1971241511198552335'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-aix-systems-for-websphere.html' title='Tuning AIX systems for WebSphere Application Server 6.0.x'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-2324510672454638330</id><published>2009-02-04T23:28:00.000-08:00</published><updated>2009-02-04T23:30:44.807-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='Application server'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='RedHat'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><category scheme='http://www.blogger.com/atom/ns#' term='optimize'/><category scheme='http://www.blogger.com/atom/ns#' term='SUSE'/><title type='text'>Tuning Linux systems for WebSphere Application Server 6.0.x</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;When you have a performance concern, check the operating system settings to  determine if these settings are appropriate for your application. Because the  Linux operating system is not a WebSphere Application Server product, be aware  that it can change and results can vary.&lt;/span&gt;&lt;/p&gt; &lt;h4 class="sectiontitle"&gt;&lt;span style="font-size:85%;"&gt;Procedure&lt;/span&gt;&lt;/h4&gt; &lt;div class="p"&gt;&lt;span style="font-size:85%;"&gt;Configure the following settings and variables according to your  tuning needs: &lt;/span&gt; &lt;ul&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;timeout_timewait parameter&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the time that must elapse before  TCP/IP can release a closed connection and reuse its resources. This interval  between closure and release is known as the TIME_WAIT state or twice the maximum  segment lifetime (2MSL) state. During this time, reopening the connection to the  client and server cost less than establishing a new connection. By reducing the  value of this entry, TCP/IP can release closed connections faster, providing  more resources for new connections. Adjust this parameter if the running  application requires rapid release, the creation of new connections, and a low  throughput due to many connections sitting in the TIME_WAIT state.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;Issue the following command to set the  timeout_timewait parameter to 30 seconds: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;echo 30 &gt; /proc/sys/net/ipv4/tcp_fin_timeout&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;SUSE Linux Enterprise Server 8 (SLES  SP2A - sched_yield_scale tuning&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; The Linux scheduler is very sensitive to  excessive context switching, so fixes are integrated into the SLES 8 kernel  distribution to introduce delay when a thread yields processing. This fix is  automatically enabled in SLES 8 SP3, but must be enabled explicitly in SLES 8  SP2A or later.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;&lt;/span&gt;  &lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Upgrade your SLES 8 service pack to SP2A.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Issue the &lt;strong&gt;sysctl -w sched_yield_scale=1&lt;/strong&gt; command .  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;0&lt;/tt&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;1&lt;/tt&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;RedHat Advanced Server 2.1 kernel update&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Kernel updates for RedHat Advanced Server 2.1  implemented changes that affect WebSphere Application Server performance,  especially memory-to-memory HTTP session replication.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;&lt;/span&gt;  &lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Issue the &lt;strong&gt;uname -a&lt;/strong&gt; command  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;If you are running any kernel prior to 2.4.9-e.23, upgrade at least to the  RedHat Advanced Server 2.1 kernel, but preferably to the latest supported.  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;2.4.9-e.3&lt;/tt&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;2.4.9-e.23&lt;/tt&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Linux file descriptors (ulimit)&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Specifies the number of open files that are  supported. The default setting is typically sufficient for most applications. If  the value set for this parameter is too low, a file open error, memory  allocation failure, or connection establishment error might be displayed.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Check the UNIX reference pages on the  &lt;strong&gt;ulimit&lt;/strong&gt; command for the syntax of different shells. To set the  &lt;strong&gt;ulimit&lt;/strong&gt; command to &lt;tt&gt;8000&lt;/tt&gt; for the KornShell shell (ksh),  issue the &lt;strong&gt;ulimit -n 8000&lt;/strong&gt; command. Use the &lt;strong&gt;ulimit  -a&lt;/strong&gt; command to display the current values for all limitations on system  resources.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; For SUSE Linux Enterprise Server 9 (SLES 9),  the default is &lt;tt&gt;1024&lt;/tt&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;8000&lt;/tt&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Connection backlog&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Change the following parameters when a high  rate of incoming connection requests result in connection failures: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;echo 3000 &gt; /proc/sys/net/core/netdev_max_backlog&lt;br /&gt;echo 3000 &gt; /proc/sys/net/core/somaxconn&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;TCP_KEEPALIVE_INTERVAL &lt;/strong&gt;&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the wait time between isAlive  interval probes.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Issue the following command to set the  value: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;echo 15 &gt; /proc/sys/net/ipv4/tcp_keepalive_intvl&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;75&lt;/tt&gt; seconds  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;15&lt;/tt&gt; seconds &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;TCP_KEEPALIVE_PROBES&lt;/strong&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the number of probes before timing  out.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; Issue the following command to set the  value: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;echo 5  &gt; /proc/sys/net/ipv4/tcp_keepalive_probes&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;9&lt;/tt&gt; seconds  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;5&lt;/tt&gt; seconds &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Allocating large pages for Java virtual machine (JVM)  heap (tested with SLES 9)&lt;/strong&gt;Some applications require a very large heap  for optimal performance. The CPU overhead of managing a large heap can be  reduced by using the “large page” support that is provided by the CPU and  operating system. The following example assumes a large page size of 4MB and a  desired heap size of 2300MB.  &lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Set the following three settings by a &lt;tt&gt;sysctl.conf&lt;/tt&gt; file, typically  located at &lt;span class="ibmfilepath"&gt;/etc/sysctl.conf&lt;/span&gt;.  &lt;/span&gt;&lt;div class="note"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="notetitle"&gt;Note:&lt;/span&gt; You must have root privilege  access to modify this file. Also, verify the file is not marked as read-only  before attempting to make changes.&lt;/span&gt;&lt;/div&gt; &lt;ol type="a"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Set the number of large pages (2300MB = 575 * 4MB) by issuing the following  command: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;vm.nr_hugepages = 575&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Set the maximum shared segment size to 2300MB plus a little more (about  95MB) (2511724800 = 2300MB * 1048576 bytes/MB + 100000000 bytes) by issuing the  following command: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;kernel.shmmax = 2511724800&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Set the total amount of memory to be shared by issuing the following  command: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;kernel.shmall = 2511724800&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Specify the -Xlp JVM option so the JVM heap can utilize large pages.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Set the Xmx JVM option to &lt;tt&gt;2300MB&lt;/tt&gt;.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Relocate the program text to a lower virtual memory address (0×10000000) to  provide more address space for a larger heap. On SUSE Linux Enterprise Server 9  , run the following command to relocate the text in the script that invokes the  JVM or in a &lt;tt&gt;.profile&lt;/tt&gt; file: &lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;echo "0x10000000" &gt; /proc/self/mapped_base&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-2324510672454638330?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/2324510672454638330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-linux-systems-for-websphere.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2324510672454638330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/2324510672454638330'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-linux-systems-for-websphere.html' title='Tuning Linux systems for WebSphere Application Server 6.0.x'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7758508046427235624.post-8263802126741486676</id><published>2009-02-04T23:06:00.000-08:00</published><updated>2009-02-04T23:15:28.895-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='Application server'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 2003'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><category scheme='http://www.blogger.com/atom/ns#' term='optimize'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Tuning Windows systems for WebSphere Application Server 6.0.x</title><content type='html'>&lt;p&gt;IBM describes how to tune Windows 2000, Windows XP, and Windows 2003  operating systems to optimize the performance of WebSphere Application Server.  Because Windows operating systems are not WebSphere Application Server products,  be aware that the products can change and results can vary.&lt;/p&gt; &lt;h4 class="sectiontitle"&gt;Procedure&lt;/h4&gt; &lt;div class="p"&gt;Configure the following settings or variables according to your  specific tuning needs:  &lt;ul&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;TcpTimedWaitDelay&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the time that must elapse before  TCP/IP can release a closed connection and reuse its resources. This interval  between closure and release is known as the TIME_WAIT state or twice the maximum  segment lifetime (2MSL) state. During this time, reopening the connection to the  client and server costs less than establishing a new connection. By reducing the  value of this entry, TCP/IP can release closed connections faster and provide  more resources for new connections. Adjust this parameter if the running  application requires rapid release, the creation of new connections, or an  adjustment because of a low throughput caused by multiple connections in the  TIME_WAIT state.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;  &lt;ol&gt;&lt;li&gt;Use the &lt;strong&gt;regedit&lt;/strong&gt; command, access the  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry  subkey, and create a new REG_DWORD value named &lt;tt&gt;TcpTimedWaitDelay&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Set the value to decimal &lt;tt&gt;30&lt;/tt&gt;, which is Hex 0×0000001e. This value  sets the wait time to 30 seconds.  &lt;/li&gt;&lt;li&gt;Stop and restart the system. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;0xF0&lt;/tt&gt;, which sets the wait time to  240 seconds (4 minutes).  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; A minimum value of &lt;tt&gt;0×1E&lt;/tt&gt;, which  sets the wait time to 30 seconds. &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;MaxUserPort&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines the highest port number that TCP/IP  can assign when an application requests an available user port from the system.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;  &lt;ol&gt;&lt;li&gt;Use the &lt;strong&gt;regedit&lt;/strong&gt; command, access the  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry  subkey, and create a new REG_DWORD value named &lt;tt&gt;MaxUserPort&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Set this value to at least decimal &lt;tt&gt;32768&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Stop and restart the system. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Default value:&lt;/strong&gt; None  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; At least decimal &lt;tt&gt;32768&lt;/tt&gt;.  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;MaxConnect Backlog&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; If many connection attempts are received  simultaneously, increase the default number of pending connections that are  supported by the operating system.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;  &lt;ol&gt;&lt;li&gt;Use the &lt;strong&gt;regedit&lt;/strong&gt; command and access the  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters registry  subkey  &lt;/li&gt;&lt;li&gt;Create and set (and create if necessary) the following values: &lt;pre&gt;"EnableDynamicBacklog"=dword:00000001&lt;br /&gt;&lt;br /&gt;"MinimumDynamicBacklog"=dword:00000020&lt;br /&gt;&lt;br /&gt;"MaximumDynamicBacklog"=dword:00001000&lt;br /&gt;&lt;br /&gt;"DynamicBacklogGrowthDelta"=dword:00000010&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;These values request a minimum of 20 and a maximum of 1000 available  connections. The number of available connections is increased by 10 each time  that there are fewer than the minimum number of available connections.  &lt;/li&gt;&lt;li&gt;Stop and restart the system. &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;KeepAliveInterval&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines how often TCP repeats keep-alive  transmissions when no response is received.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;  &lt;ol&gt;&lt;li&gt;Use the &lt;strong&gt;regedit&lt;/strong&gt; command, access the  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters registry  subkey, and create a new REG_DWORD value named &lt;tt&gt;KeepAliveInterval&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Set this value to &lt;tt&gt;1&lt;/tt&gt; second.  &lt;/li&gt;&lt;li&gt;Stop and restart the system. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;1&lt;/tt&gt; second  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;None&lt;/tt&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;TcpMaxDataRetranmission&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Determines how many times TCP retransmits an  unacknowledged data segment on an existing connection.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt;  &lt;ol&gt;&lt;li&gt;Use the &lt;strong&gt;regedit&lt;/strong&gt; command, access the  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters registry  subkey, and edit or create a new REG_DWORD value named  &lt;tt&gt;TcpMaxDataRetransmissions&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Set this value to &lt;tt&gt;5&lt;/tt&gt; seconds  &lt;/li&gt;&lt;li&gt;Stop and restart the system. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Default value:&lt;/strong&gt; &lt;tt&gt;5&lt;/tt&gt; second  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recommended value:&lt;/strong&gt; &lt;tt&gt;None&lt;/tt&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;TPC/IP acknowledgements&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;TCP/IP can be the source of some significant remote method delays. You can  increase TCP performance by immediately acknowledging incoming TCP segments, in  all situations.Complete the following steps to immediately acknowledge incoming  TCP segments on a server that runs a Microsoft Windows 2000 operating system:  &lt;ol&gt;&lt;li&gt;Start the Registry Editor (&lt;tt&gt;regedit.exe&lt;/tt&gt;).  &lt;/li&gt;&lt;li&gt;Locate and click the following registry subkey: &lt;pre&gt;HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;On the Edit menu, click &lt;strong&gt;Add Value&lt;/strong&gt;, and create the following  registry value: &lt;pre&gt;Value name: TcpDelAckTicks&lt;br /&gt;Data type: REG_DWORD&lt;br /&gt;Value data: 0&lt;br /&gt;Quit Registry Editor.&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;Restart your Windows operating system. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Similarly, to immediately acknowledge incoming TCP segments on a server that  runs a Microsoft Windows XP or Windows Server 2003 operating system:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Start the Registry Editor (&lt;tt&gt;regedit.exe&lt;/tt&gt;).  &lt;/li&gt;&lt;li&gt;Locate and then click the following registry subkey: &lt;pre&gt;HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;On the Edit menu, click &lt;strong&gt;New&lt;/strong&gt; &gt; &lt;strong&gt;DWORD  Value.&lt;/strong&gt;  &lt;/li&gt;&lt;li&gt;Name the new value, &lt;tt&gt;TcpAckFrequency&lt;/tt&gt;, and assign it a value of  &lt;tt&gt;1&lt;/tt&gt;.  &lt;/li&gt;&lt;li&gt;Close the Registry Editor.  &lt;/li&gt;&lt;li&gt;Restart your Windows operating system. &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="liexpand"&gt;&lt;strong&gt;Large page support&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Using large pages can reduce the CPU overhead  of managing a large JVM heap.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to view or set:&lt;/strong&gt; The Windows operating system provides  large page support by default. Use the &lt;tt&gt;-Xlp JVM&lt;/tt&gt; option to make use of  this support. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7758508046427235624-8263802126741486676?l=nobottlenecks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nobottlenecks.blogspot.com/feeds/8263802126741486676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-windows-systems-for-websphere.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/8263802126741486676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7758508046427235624/posts/default/8263802126741486676'/><link rel='alternate' type='text/html' href='http://nobottlenecks.blogspot.com/2009/02/tuning-windows-systems-for-websphere.html' title='Tuning Windows systems for WebSphere Application Server 6.0.x'/><author><name>no bottlenecks</name><uri>http://www.blogger.com/profile/13744772654577499088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='http://3.bp.blogspot.com/_-nB15XVEWfc/SYqPNiWI3tI/AAAAAAAAAAs/woonEJHjKCA/S220/speed1.jpg'/></author><thr:total>0</thr:total></entry></feed>
