<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Monitoring &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/category/monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Wed, 09 Oct 2013 08:16:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.15</generator>
	<item>
		<title>How To Check The Heath Of Adaptec RAID Using arrconf On CentOS</title>
		<link>https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/</link>
					<comments>https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 09 Oct 2013 08:01:05 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1873</guid>

					<description><![CDATA[<p>The arcconf tool is used for managing the controller on the command-line interface and It use to check the health of Adaptec RAID under Linux server from a shell prompt. In this tutorial, I will show you How do I check the health of Adaptec RAID using arcconf command. The first, login as root and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/">How To Check The Heath Of Adaptec RAID Using arrconf On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>The <strong>arcconf </strong>tool is used for managing the controller on the command-line interface and It use to check the health of Adaptec RAID under Linux server from a shell prompt. In this tutorial, I will show you How do I check the health of Adaptec RAID using arcconf command.<br />
<span id="more-1873"></span><br />
The first, login as root and type these following commands</p>
<pre>
# wget http://download.adaptec.com/raid/storage_manager/asm_linux_x64_v6_50_18579.tgz
# tar -zxf asm_linux_x64_v6_50_18579.tgz
# rm -f asm_linux_x64_v6_50_18579.tgz
# cd cmdline/
# chmod +x arcconf
</pre>
<p>If you&#8217;ll get this error when you try to run arcconf:</p>
<pre>
./arcconf: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
</pre>
<p>Type the following command to fix it</p>
<pre>
# yum -y install compat-libstdc++-33
</pre>
<p>The second, to view and modify other RAID configuration use arcconf program to view health of RAID. Simply, login as the root and type the following command at a shell prompt</p>
<pre>
./arcconf GETCONFIG 1
</pre>
<p>Sample output:</p>
<pre>
Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   Controller Status                        : Optimal
   Channel description                      : SAS/SATA
   Controller Model                         : Adaptec 6805
   Controller Serial Number                 : 2B2511FCA4E
   Physical Slot                            : 17
   Temperature                              : 66 C/ 150 F (Normal)
   Installed memory                         : 512 MB
   Copyback                                 : Disabled
   Background consistency check             : Disabled
   Automatic Failover                       : Enabled
   Global task priority                     : High
   Performance Mode                         : Default/Dynamic
   Stayawake period                         : Disabled
   Spinup limit internal drives             : 0
   Spinup limit external drives             : 0
   Defunct disk drive count                 : 0
   Logical devices/Failed/Degraded          : 2/0/0
   NCQ status                               : Enabled
   Statistics data collection mode          : Enabled
   --------------------------------------------------------
   Controller Version Information
   --------------------------------------------------------
   BIOS                                     : 5.2-0 (18668)
   Firmware                                 : 5.2-0 (18668)
   Driver                                   : 1.1-7 (28000)
   Boot Flash                               : 5.2-0 (18668)
   --------------------------------------------------------
   Controller ZMM Information
   --------------------------------------------------------
   Status                                   : ZMM not installed

----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
   Logical device name                      : raid1
   RAID level                               : 1
   Status of logical device                 : Optimal
   Size                                     : 114290 MB
   Read-cache mode                          : Enabled
   Write-cache mode                         : Enabled (write-back)
   Write-cache setting                      : Enabled (write-back)
   Partitioned                              : Yes
   Protected by Hot-Spare                   : No
   Bootable                                 : Yes
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Connector:0,                                                                                        Device:0) CVMP23450090120BGN
   Segment 1                                : Present (Controller:1,Connector:0,                                                                                        Device:1) CVMP234101YH120BGN

Logical device number 1
   Logical device name                      : raid10
   RAID level                               : 10
   Status of logical device                 : Optimal
   Size                                     : 3809270 MB
   Stripe-unit size                         : 256 KB
   Read-cache mode                          : Enabled
   Write-cache mode                         : Enabled (write-back)
   Write-cache setting                      : Enabled (write-back)
   Partitioned                              : Yes
   Protected by Hot-Spare                   : No
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Group 0, Segment 0                       : Present (Controller:1,Connector:0,                                                                                        Device:2)      WD-WMAY04356528
   Group 0, Segment 1                       : Present (Controller:1,Connector:0,                                                                                        Device:3)      WD-WMAY04421540
   Group 1, Segment 0                       : Present (Controller:1,Connector:1,                                                                                        Device:0)      WD-WMAY04422111
   Group 1, Segment 1                       : Present (Controller:1,Connector:1,                                                                                        Device:1)      WD-WMAY04353276


----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
      Device #0
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,0(0:0)
         Reported Location                  : Connector 0, Device 0
         Vendor                             : INTEL
         Model                              : SSDSC2CT120A3
         Firmware                           : 300i
         Serial number                      : CVMP23450090120BGN
         Size                               : 114473 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled
      Device #1
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,1(1:0)
         Reported Location                  : Connector 0, Device 1
         Vendor                             : INTEL
         Model                              : SSDSC2CT120A3
         Firmware                           : 300i
         Serial number                      : CVMP234101YH120BGN
         Size                               : 114473 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled
      Device #2
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,2(2:0)
         Reported Location                  : Connector 0, Device 2
         Vendor                             : WDC
         Model                              : WD2003FYYS-02W0B
         Firmware                           : 01.01D02
         Serial number                      : WD-WMAY04356528
         Size                               : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled
      Device #3
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,3(3:0)
         Reported Location                  : Connector 0, Device 3
         Vendor                             : WDC
         Model                              : WD2003FYYS-02W0B
         Firmware                           : 01.01D02
         Serial number                      : WD-WMAY04421540
         Size                               : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled
      Device #4
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,4(4:0)
         Reported Location                  : Connector 1, Device 0
         Vendor                             : WDC
         Model                              : WD2003FYYS-02W0B
         Firmware                           : 01.01D02
         Serial number                      : WD-WMAY04422111
         Size                               : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled
      Device #5
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,5(5:0)
         Reported Location                  : Connector 1, Device 1
         Vendor                             : WDC
         Model                              : WD2003FYYS-02W0B
         Firmware                           : 01.01D02
         Serial number                      : WD-WMAY04353276
         Size                               : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         NCQ status                         : Enabled


Command completed successfully.
</pre>
<g:plusone href="https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/">How To Check The Heath Of Adaptec RAID Using arrconf On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-check-the-heath-of-adaptec-raid-using-arrconf-on-centos/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To View Linux Last Reboot / Shutdown Date And Time</title>
		<link>https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/</link>
					<comments>https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Tue, 03 Jan 2012 07:47:48 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/var/log/wtmp]]></category>
		<category><![CDATA[/var/run/utmp]]></category>
		<category><![CDATA[aix last reboot]]></category>
		<category><![CDATA[command searches]]></category>
		<category><![CDATA[display server reboot time]]></category>
		<category><![CDATA[display server shutdown time]]></category>
		<category><![CDATA[last command]]></category>
		<category><![CDATA[linux last command]]></category>
		<category><![CDATA[linux last login]]></category>
		<category><![CDATA[linux sys admin]]></category>
		<category><![CDATA[reboot system]]></category>
		<category><![CDATA[server last reboot]]></category>
		<category><![CDATA[shutdown system]]></category>
		<category><![CDATA[time of last system boot]]></category>
		<category><![CDATA[unix last reboot]]></category>
		<category><![CDATA[wtmp]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1295</guid>

					<description><![CDATA[<p>Q. How do you find Linux system last reboot/shutdown date and time? A. You can use &#8220;last&#8221; command which will display all the previous reboot date and time for the system. This picks the information from the /var/log/wtmp file. Last command Use last command to display listing of system last reboot time and date: # [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/">How To View Linux Last Reboot / Shutdown Date And Time</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><span style="color: #ff0000;"><strong>Q</strong></span>. How do you find Linux system last reboot/shutdown date and time?<br />
<span style="color: #008000;"><strong>A</strong></span>. You can use &#8220;last&#8221; command which will display all the previous reboot date and time for the system. This picks the information from the /var/log/wtmp file.<br />
<span id="more-1295"></span></p>
<h2>Last command</h2>
<p>Use last command to display listing of system last reboot time and date:</p>
<pre># last reboot -1</pre>
<p>Output</p>
<pre>reboot   system boot  2.6.18-274.12.1. Wed Dec 14 06:01</pre>
<p>To display last shutdown date and time use following command:</p>
<pre># last -x | grep shutdown | head -1</pre>
<p>Output</p>
<pre>shutdown system down  2.6.18-274.12.1. Wed Dec 14 06:44</pre>
<h2>Who command</h2>
<p>Use the &#8220;who -b&#8221; command which displays the last system reboot date and time</p>
<pre># who -b</pre>
<p>Output</p>
<pre>system boot  2011-12-14 06:44</pre>
<g:plusone href="https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/">How To View Linux Last Reboot / Shutdown Date And Time</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-view-linux-last-reboot-shutdown-date-and-time/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How Do I Find Hidden Processes and Ports ?</title>
		<link>https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/</link>
					<comments>https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 30 Dec 2011 02:09:03 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[bruteforcing]]></category>
		<category><![CDATA[dependency tree]]></category>
		<category><![CDATA[forensic tool]]></category>
		<category><![CDATA[hidden processes]]></category>
		<category><![CDATA[kernels]]></category>
		<category><![CDATA[lkms]]></category>
		<category><![CDATA[ms windows operating systems]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[netstat command]]></category>
		<category><![CDATA[posix]]></category>
		<category><![CDATA[process ids]]></category>
		<category><![CDATA[security projects]]></category>
		<category><![CDATA[ss command]]></category>
		<category><![CDATA[tcp udp ports]]></category>
		<category><![CDATA[unhide-tcp command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1274</guid>

					<description><![CDATA[<p>Unhide is a forensic tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique. Unhide (ps) Detecting hidden processes. Implements six techniques Compare /proc vs /bin/ps output  Compare info gathered from /bin/ps with info gathered by walking thru the procfs. Compare info gathered from /bin/ps with info gathered [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/">How Do I Find Hidden Processes and Ports ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>Unhide</strong> is a forensic tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique.<span id="more-1274"></span><br />
<strong>Unhide (ps)</strong><br />
Detecting hidden processes. Implements six techniques</p>
<ul>
<li>Compare /proc vs /bin/ps output</li>
<li> Compare info gathered from /bin/ps with info gathered by walking thru the procfs.</li>
<li>Compare info gathered from /bin/ps with info gathered from syscalls (syscall scanning).</li>
<li>Full PIDs space occupation (PIDs bruteforcing)</li>
<li>Reverse search, verify that all thread seen by ps are also seen by the kernel ( /bin/ps output vs /proc, procfs walking and syscall )</li>
<li>Quick compare /proc, procfs walking and syscall vs /bin/ps output.</li>
</ul>
<p><strong>Unhide-TCP</strong><br />
Identify TCP/UDP ports that are listening but not listed in /bin/netstat doing brute forcing of all TCP/UDP ports availables.</p>
<h2>How do I install unhide</h2>
<p>To install Unhide under CentOS/RedHat, login as root and type the following command</p>
<pre>
# yum install unhide
</pre>
<p>Sample outputs</p>
<pre>
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package unhide.x86_64 0:0.0.20080519-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch          Version                      Repository       Size
================================================================================
Installing:
 unhide        x86_64        0.0.20080519-1.el5.rf        rpmforge        528 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 528 k
Is this ok [y/N]: y
Downloading Packages:
unhide-0.0.20080519-1.el5.rf.x86_64.rpm                  | 528 kB     00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : unhide                                                   1/1

Installed:
  unhide.x86_64 0:0.0.20080519-1.el5.rf

Complete!
</pre>
<h2>How do I use this tool</h2>
<p>You can use it as follows:</p>
<pre>
# unhide proc | sys | brute
</pre>
<p>Example, type the following command to find hidden proc</p>
<pre>
# unhide proc
Unhide 20080519
yjesus@security-projects.com
[*]Searching for Hidden processes through /proc scanning
</pre>
<p>Example, type the following command to find the hidden TCP/UDP ports</p>
<pre>
# unhide-tcp
</pre>
<p>Sample outputs</p>
<pre>
Unhide 20080519
yjesus@security-projects.com
Starting TCP checking
Starting UDP checking
</pre>
<p>No found hidden ports using the unhide-tcp command.</p>
<g:plusone href="https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/">How Do I Find Hidden Processes and Ports ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-do-i-find-hidden-processes-and-ports/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Listing Of Last Reboot / Shutdown Date And Time</title>
		<link>https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/</link>
					<comments>https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 00:48:51 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/var/log/wtmp]]></category>
		<category><![CDATA[/var/run/utmp]]></category>
		<category><![CDATA[aix last reboot]]></category>
		<category><![CDATA[command searches]]></category>
		<category><![CDATA[display server reboot time]]></category>
		<category><![CDATA[display server shutdown time]]></category>
		<category><![CDATA[last command]]></category>
		<category><![CDATA[last reboot]]></category>
		<category><![CDATA[linux last command]]></category>
		<category><![CDATA[linux last login]]></category>
		<category><![CDATA[linux sys admin]]></category>
		<category><![CDATA[reboot system]]></category>
		<category><![CDATA[server last reboot]]></category>
		<category><![CDATA[shutdown system]]></category>
		<category><![CDATA[time of last system boot]]></category>
		<category><![CDATA[unix last reboot]]></category>
		<category><![CDATA[wtmp]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1009</guid>

					<description><![CDATA[<p>Using last command to show listing of last reboot / shutdown date and time. Last command which searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. Names of users and tty&#8217;s can be given, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/">Listing Of Last Reboot / Shutdown Date And Time</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Using <strong>last command</strong> to show listing of last reboot / shutdown date and time. <strong>Last command</strong> which searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. Names of users and tty&#8217;s can be given, in which case last will show only those entries matching the arguments. Names of ttys can be abbreviated, thus last 0 is the same as last tty0.<br />
<span id="more-1009"></span><br />
To show listing of last reboot, type the following command</p>
<pre>
# last reboot
</pre>
<p>Sample output</p>
<pre>
reboot   system boot  2.6.18-194.32.1. Wed May 25 09:52         (90+21:57)
reboot   system boot  2.6.18-194.32.1. Sat Apr 23 09:20         (122+22:28)
reboot   system boot  2.6.18-194.32.1. Mon Apr 18 14:13         (4+02:33)

wtmp begins Tue Apr  5 15:15:41 2011
</pre>
<p>To show listing of last shutdown, type the following command</p>
<pre>
# last -x | grep down
</pre>
<p>Sample output</p>
<pre>
shutdown system down  2.6.18-194.32.1. Fri Apr 22 16:46 - 07:50 (123+15:03)
</pre>
<p><strong>Where</strong><br />
-x: Display the system shutdown entries and run level changes.</p>
<g:plusone href="https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/">Listing Of Last Reboot / Shutdown Date And Time</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/listing-of-last-reboot-shutdown-date-and-time/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Monit On Centos / Redhat</title>
		<link>https://lifelinux.com/how-to-install-monit-on-centos-redhat/</link>
					<comments>https://lifelinux.com/how-to-install-monit-on-centos-redhat/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 13 May 2011 08:06:46 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[enable EPEL]]></category>
		<category><![CDATA[how to auto restart mysql apache on fail]]></category>
		<category><![CDATA[init.d respawn apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux script restart daemon]]></category>
		<category><![CDATA[monit]]></category>
		<category><![CDATA[monit apache]]></category>
		<category><![CDATA[monit init.d]]></category>
		<category><![CDATA[monit lighttpd]]></category>
		<category><![CDATA[monitor load and]]></category>
		<category><![CDATA[monitoring services]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[restart apache]]></category>
		<category><![CDATA[restart apache automatically]]></category>
		<category><![CDATA[restart lighttpd]]></category>
		<category><![CDATA[service availability]]></category>
		<category><![CDATA[superior solution]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[web servers]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=458</guid>

					<description><![CDATA[<p>What is Monit ? Monit is a free open source utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. What Monit can do Monit can start a process if it does not run, restart a [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-monit-on-centos-redhat/">How To Install Monit On Centos / Redhat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><h3>What is Monit ?</h3>
<p><strong>Monit</strong> is a free open source utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.<span id="more-458"></span></p>
<h3>What Monit can do</h3>
<p><strong>Monit</strong> can start a process if it does not run, restart a process if it does not respond and stop a process if it uses too much resources. You can use Monit to monitor files, directories and filesystems for changes, such as timestamp changes, checksum changes or size changes. You can also monitor remote hosts; Monit can ping a remote host and can check TCP/IP port connections and server protocols. Monit is controlled via an easy to use control file based on a free-format, token-oriented syntax. Monit logs to syslog or to its own log file and notifies you about error conditions and recovery status via customizable alert.</p>
<h3>Install Monit</h3>
<p>The first, you need to enable EPEL (Extra Packages for Enterprise Linux) to install monit package. Login as root and type the following command:</p>
<pre>[root@lifelinux ~]# vi /etc/yum.repos.d/epel.repo</pre>
<p>Add or uncomment the following content at end of the file</p>
<pre>[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&amp;arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0</pre>
<p>Save and close the file. And type the following command</p>
<pre>[root@lifelinux ~]# yum clean all</pre>
<p>To install monit, type the following command</p>
<pre>[root@lifelinux ~]# yum install monit</pre>
<p>Turn on monit when system start up</p>
<pre>[root@lifelinux ~]# chkconfig --levels 235 monit on</pre>
<h3>Configure Monit</h3>
<p>The configuration file of monit in Centos or RedHat is /etc/monit.conf. Type the following command to edit</p>
<pre>[root@lifelinux ~]# vi /etc/monit.conf</pre>
<p>Sampe configuration file</p>
<pre>set daemon 60
set logfile /var/log/monit.log
set mailserver localhost
set mail-format { from: alert@domain.com
subject: $SERVICE $EVENT at $DATE
message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.
}
set alert admin@domain.com
include /etc/monit.d/*</pre>
<p>Now to monitor Apache, create a file /etc/monit.d/httpd, enter</p>
<pre>[root@lifelinux ~]# vi /etc/monit.d/httpd</pre>
<p>Add following content</p>
<pre>check process httpd with pidfile /var/run/httpd.pid
group apache
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
if failed host 127.0.0.1 port 80
protocol http then restart
if 5 restarts within 5 cycles then timeout</pre>
<p>MySQL server restart configuration directives</p>
<pre>check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group mysql
start program = "/etc/init.d/mysqld start"
stop program = "/etc/init.d/mysqld stop"
if failed host 127.0.0.1 port 3306 then restart
if 5 restarts within 5 cycles then timeout</pre>
<p>SSH server configuration directives</p>
<pre>check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/sshd start"
stop program "/etc/init.d/sshd stop"
if failed host 127.0.0.1 port 22 protocol ssh then restart
if 5 restarts within 5 cycles then timeout</pre>
<p>Type the following command to start monit</p>
<pre>[root@lifelinux ~]# /etc/init.d/monit start</pre>
<p>You can verify that monit is started from /var/log/monit.log log file:</p>
<pre>
[root@lifelinux ~]# tail -f /var/log/monit.log
</pre>
<p>Sample ouputs</p>
<pre>[ICT May 12 14:51:18] info     : 'system_server2.domain.com' Monit started</pre>
<h3>Further readings</h3>
<p>Monit <a href="http://mmonit.com/">home page</a><br />
Monit <a href="http://mmonit.com/wiki/">documenation</a><br />
Monit <a href="http://mmonit.com/wiki/Monit/ConfigurationExamples">configuration examples</a></p>
<g:plusone href="https://lifelinux.com/how-to-install-monit-on-centos-redhat/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-monit-on-centos-redhat/">How To Install Monit On Centos / Redhat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-install-monit-on-centos-redhat/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install OpenSSH on Centos / RedHat</title>
		<link>https://lifelinux.com/how-to-install-openssh-on-centos-redhat/</link>
					<comments>https://lifelinux.com/how-to-install-openssh-on-centos-redhat/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Tue, 10 May 2011 08:06:12 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/etc/ssh/sshd_config]]></category>
		<category><![CDATA[best security]]></category>
		<category><![CDATA[centos install open ssh client]]></category>
		<category><![CDATA[centos install open ssh server]]></category>
		<category><![CDATA[client applications]]></category>
		<category><![CDATA[dport]]></category>
		<category><![CDATA[firewall 1]]></category>
		<category><![CDATA[firewall settings]]></category>
		<category><![CDATA[linux operating systems]]></category>
		<category><![CDATA[port 22]]></category>
		<category><![CDATA[security practices]]></category>
		<category><![CDATA[server configuration]]></category>
		<category><![CDATA[server daemon]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[yum command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=365</guid>

					<description><![CDATA[<p>What is OpenSSH ? OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-openssh-on-centos-redhat/">How To Install OpenSSH on Centos / RedHat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><h3>What is OpenSSH ?</h3>
<p><strong>OpenSSH</strong> is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. <strong>OpenSSH</strong> encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, <strong>OpenSSH</strong> provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.<span id="more-365"></span></p>
<h3>Install OpenSSH under CentOS Linux</h3>
<p>To install the server and client type the following command:</p>
<pre>[root@lifelinux ~]# yum install openssh-server</pre>
<p>Start the service:</p>
<pre>[root@lifelinux ~]# service sshd start</pre>
<p>Set sshd service to automatically start at boot time, type the following command</p>
<pre>[root@lifelinux ~]# chkconfig sshd on</pre>
<p>Check &amp; Make sure port 22 is opened:</p>
<pre>[root@lifelinux ~]# netstat -tulpn | grep :22</pre>
<p>Sample outputs:</p>
<pre>tcp        0      0 :::22                       :::*                        LISTEN      1703/sshd</pre>
<h3>OpenSSH Server Configuration</h3>
<p>Now you need to edit the /etc/ssh/sshd_config file using vi or any other editor and you need to change the following Directives or add the following directives for OpenSSH server configuration these are only some of basic directives if you want to know available directives check <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&amp;sektion=5">here</a><br />
To change SSH listening port, example change port to 2222</p>
<pre>Port 2222</pre>
<p>To disable root logins, edit or add as follows:</p>
<pre>PermitRootLogin no</pre>
<p>Allow only SSH protocol 2</p>
<pre>Protocol 2</pre>
<p>Allow only user1 and user2 over SSH:</p>
<pre>AllowUsers user1 user2</pre>
<h3>Firewall Settings</h3>
<p>Open /etc/sysconfig/iptables file, enter:</p>
<pre>[root@lifelinux ~]# vi /etc/sysconfig/iptables</pre>
<p>Add the following line</p>
<pre>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT</pre>
<p>Save and close the file. Restart the firewall:</p>
<pre>[root@lifelinux ~]# /etc/init.d/iptables restart</pre>
<g:plusone href="https://lifelinux.com/how-to-install-openssh-on-centos-redhat/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-openssh-on-centos-redhat/">How To Install OpenSSH on Centos / RedHat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-install-openssh-on-centos-redhat/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Display motherboard information on Linux</title>
		<link>https://lifelinux.com/display-motherboard-information-on-linux/</link>
					<comments>https://lifelinux.com/display-motherboard-information-on-linux/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Mon, 25 Apr 2011 16:09:37 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[disk space usage]]></category>
		<category><![CDATA[dma channels]]></category>
		<category><![CDATA[Dmidecode]]></category>
		<category><![CDATA[Dmidecode command]]></category>
		<category><![CDATA[ehci]]></category>
		<category><![CDATA[fpu]]></category>
		<category><![CDATA[get mainboad info]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[hardware conflict]]></category>
		<category><![CDATA[irq]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[memory information]]></category>
		<category><![CDATA[output device]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[system disk space]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=303</guid>

					<description><![CDATA[<p>Dmidecode reports information about your system&#8217;s hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/display-motherboard-information-on-linux/">Display motherboard information on Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Dmidecode reports information about your system&#8217;s hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB).<span id="more-303"></span><br />
The command example below show the use of dmidecode command to display motherboard information or baseboard information.</p>
<pre>
[root@lifelinux ~]# dmidecode --type baseboard
</pre>
<p>Sample outputs:</p>
<pre>
# dmidecode 2.10
SMBIOS 2.6 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: Supermicro
	Product Name: X8SIE
	Version: 0123456789
	Serial Number: 0123456789
	Asset Tag: To Be Filled By O.E.M.
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: To Be Filled By O.E.M.
	Chassis Handle: 0x0003
	Type: Motherboard
	Contained Object Handles: 0

Handle 0x0047, DMI type 41, 11 bytes
Onboard Device
	Reference Designation: To Be Filled By O.E.M.
	Type: Video
	Status: Enabled
	Type Instance: 0

Handle 0x0048, DMI type 41, 11 bytes
Onboard Device
	Reference Designation: To Be Filled By O.E.M.
	Type: SCSI Controller
	Status: Disabled
	Type Instance: 0
</pre>
<p>Get more infomation using dmidecode command. Type the following command:</p>
<pre>
[root@lifelinux ~]# dmidecode --type
</pre>
<p>Output:</p>
<pre>
dmidecode: option `--type' requires an argument
Type number or keyword expected
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot
</pre>
<p>Example, get processor information. Type the following command:</p>
<pre>
[root@lifelinux ~]# dmidecode --type processor
</pre>
<p>Sample outputs:</p>
<pre>
# dmidecode 2.10
SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
	Socket Designation: CPU
	Type: Central Processor
	Family: Xeon
	Manufacturer: Intel            
	ID: E5 06 01 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 30, Stepping 5
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (Fast floating-point save and restore)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Hyper-threading technology)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Xeon(R) CPU           X3440  @ 2.53GHz     
	Voltage: Unknown
	External Clock: 133 MHz
	Max Speed: 2533 MHz
	Current Speed: 2533 MHz
	Status: Populated, Enabled
	Upgrade: Other
	L1 Cache Handle: 0x0005
	L2 Cache Handle: 0x0006
	L3 Cache Handle: 0x0007
	Serial Number: To Be Filled By O.E.M.
	Asset Tag: To Be Filled By O.E.M.
	Part Number: To Be Filled By O.E.M.
	Core Count: 4
	Core Enabled: 4
	Thread Count: 8
	Characteristics:
		64-bit capable
</pre>
<g:plusone href="https://lifelinux.com/display-motherboard-information-on-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/display-motherboard-information-on-linux/">Display motherboard information on Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/display-motherboard-information-on-linux/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Anti SYN Flood with IPTables</title>
		<link>https://lifelinux.com/anti-syn-flood-with-iptables/</link>
					<comments>https://lifelinux.com/anti-syn-flood-with-iptables/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Thu, 21 Apr 2011 05:53:05 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[--hitcount]]></category>
		<category><![CDATA[anti syn flood]]></category>
		<category><![CDATA[connecttion limited by iptables]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[limit connection]]></category>
		<category><![CDATA[syn flood]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=288</guid>

					<description><![CDATA[<p>#!/bin/sh # A simple shell to build a Firewall anti SYN Flood # Under CentOS, Fedora and RHEL / Redhat Enterprise Linux # servers. # ---------------------------------------------------------------------------- # Written by LongVNIT # (c) 2009 lifeLinux under GNU GPL v2.0+ IPT="iptables" MODPROBE="modprobe" IF="eth0" IP="192.168.1.112" PORT="22 80 443" CHECK_TIME=60 BAN_TIME=120 HITCOUNT=10 MOD="ip_tables ip_conntrack iptable_filter ipt_state" # Load Module [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/anti-syn-flood-with-iptables/">Anti SYN Flood with IPTables</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><pre>
#!/bin/sh
# A simple shell to build a Firewall anti SYN Flood
# Under CentOS, Fedora and RHEL / Redhat Enterprise Linux
# servers.
# ----------------------------------------------------------------------------
# Written by LongVNIT <http://www.lifelinux.com/>
# (c) 2009 lifeLinux under GNU GPL v2.0+

IPT="iptables"
MODPROBE="modprobe"
IF="eth0"
IP="192.168.1.112"
PORT="22 80 443"
CHECK_TIME=60
BAN_TIME=120
HITCOUNT=10
MOD="ip_tables ip_conntrack iptable_filter ipt_state"

# Load Module
for M in $MOD
do
	$MODPROBE $M
done

# Flush IPTables
$IPT -F
$IPT -X
$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD DROP

# Define SYN_CHECK CHAIN
$IPT -N SYN_CHECK

# BAN IP IN 
$IPT -t mangle -A PREROUTING -p TCP -d $IP -m recent --name SYN --update --seconds $BAN_TIME --hitcount $HITCOUNT -j DROP

# DROP INVALID PACKET
$IPT -A INPUT -p TCP ! --syn -m state --state NEW -j DROP

# ACCPET ALL ESTABLISHED PACKET
$IPT -A INPUT -i $IF -m state --state ESTABLISHED -j ACCEPT

# CHECK SYN
for P in $PORT
do
	$IPT -A INPUT -i $IF -p TCP -d $IP --dport $P -m state --state NEW -j SYN_CHECK
done

# ACCEPT
for P in $PORT
do
	$IPT -A INPUT -i $IF -p TCP -d $IP --dport $P -m state --state NEW -j ACCEPT
done

# SYN_CHECK CHAIN
$IPT -A SYN_CHECK -m recent --set --name SYN
$IPT -A SYN_CHECK -m recent --name SYN --update --seconds $CHECK_TIME --hitcount $HITCOUNT -j LOG --log-level 5 --log-prefix "SYN_FLOOD"
$IPT -A SYN_CHECK -m recent --name SYN --update --seconds $CHECK_TIME --hitcount $HITCOUNT -j DROP
</pre>
<g:plusone href="https://lifelinux.com/anti-syn-flood-with-iptables/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/anti-syn-flood-with-iptables/">Anti SYN Flood with IPTables</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/anti-syn-flood-with-iptables/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Monitoring A System With Sysstat On CentOS</title>
		<link>https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/</link>
					<comments>https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 26 Nov 2010 03:51:41 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[iostat command]]></category>
		<category><![CDATA[monitor centos]]></category>
		<category><![CDATA[monitor linux]]></category>
		<category><![CDATA[monitor with sar]]></category>
		<category><![CDATA[monitoring server linux]]></category>
		<category><![CDATA[mpstat command]]></category>
		<category><![CDATA[sar command]]></category>
		<category><![CDATA[sysstat]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=218</guid>

					<description><![CDATA[<p>The Sysstat package contains utilities to monitor system performance and usage activity. Sysstat contains the sar, iostat, mpstat,&#8230; utilities, common to many commercial Unixes, and tools you can schedule via cron to collect and historize performance and activity data. In this topic, i&#8217;ll explain how to monitor a system with sysstat on CentOS. Installing Sysstat [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/">Monitoring A System With Sysstat On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>The <strong>Sysstat </strong>package contains           utilities to monitor system performance and usage activity.           Sysstat contains the <strong>sar</strong>, <strong>iostat</strong>, <strong>mpstat</strong>,&#8230; utilities, common to many           commercial Unixes, and tools you can schedule via cron to collect           and historize performance and activity data. In this topic, i&#8217;ll explain how to monitor a system with sysstat on CentOS.<span id="more-218"></span></p>
<h2>Installing Sysstat</h2>
<pre>yum install sysstat
</pre>
<h2>Start sysstat service</h2>
<pre>/etc/init.d/sysstat start
</pre>
<h2>Set sysstat service to automatically startup</h2>
<pre><a href="http://www.lifelinux.com/chkconfig-command/">chkconfig</a> sysstat on
</pre>
<h2>sysstat reports activity</h2>
<p>By default, sysstat reports activity every 10 minutes everyday. If you’d like to change that interval, edit it here:</p>
<pre>vi /etc/cron.d/sysstat
</pre>
<pre># run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A
</pre>
<h2>iostat command</h2>
<p>The iostat command displays the average CPU usage since the last reboot. By default, the command without an option displays the average CPU usage and input/output stats of all the drives and their partitions. Type the following command:</p>
<pre>[root@server2 sa]# iostat
Linux 2.6.18-194.17.1.el5 (server2)  11/26/2010

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
0.96    0.00    0.26    0.03    0.00   98.75

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               8.77         1.51       275.43    5272719  960252518
sdb               8.79         1.55       275.43    5413063  960252518
dm-0             34.52         3.06       275.43   10684502  960252518
dm-1              0.00         0.00         0.00       1666      11358
dm-2              2.22         0.05        17.75     180478   61885856
dm-3              0.00         0.00         0.00       1460        136
dm-4             32.29         3.01       257.68   10500418  898355168
</pre>
<p>If you may also wanted to display the CPU stats after every specific interval say, 5 seconds</p>
<pre>[root@server2 sa]# iostat -tc 5
Linux 2.6.18-194.17.1.el5 (server2)  11/26/2010

Time: 11:19:56 AM
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
0.96    0.00    0.26    0.03    0.00   98.75

Time: 11:20:01 AM
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
2.17    0.00    0.57    0.03    0.00   97.22
</pre>
<h2>mpstat command</h2>
<p><strong>mpstat</strong> command is use to display CPU usage of each CPU individually. By default, mpstat command without option shows the extended output of CPU usage. See bellow:</p>
<pre>[root@server2 sa]# mpstat
Linux 2.6.18-194.17.1.el5 (server2)  11/26/2010

11:21:31 AM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
11:21:31 AM  all    0.96    0.00    0.16    0.03    0.04    0.06    0.00   98.75   1107.64
</pre>
<h2>sar command</h2>
<p><strong>sar </strong>command generates the stats for CPU usage, RAM usage and load average of the server and stores them in a file at regular interval. By default, the command without an option displays CPU stats of the current day, type the following command:</p>
<pre>[root@server2 sa]# sar
Linux 2.6.18-194.17.1.el5 (server2)  11/26/2010

12:00:01 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
12:10:01 AM       all      1.80      0.00      0.35      0.04      0.00     97.81
...
</pre>
<p>Display data stored in output file pass -f option</p>
<pre>[root@server2 sa]# sar -f /var/log/sa/sa10 | more
Linux 2.6.18-194.17.1.el5 (server2)  11/10/2010

12:00:01 AM       CPU     %user     %nice   %system   %iowait    %steal     %idl
e
12:10:01 AM       all      1.02      0.00      0.38      0.04      0.00     98.5
6
...
</pre>
<p>Display the current CPU usage in specific time interval. The following command generates the output every 5 seconds for 2 times.</p>
<pre>[root@server2 sa]# sar -u 5 2
Linux 2.6.18-194.17.1.el5 (server2)  11/26/2010

11:26:42 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
11:26:47 AM       all      1.52      0.00      0.53      0.05      0.00     97.90
11:26:52 AM       all      3.00      0.00      0.60      0.02      0.00     96.38
Average:          all      2.26      0.00      0.56      0.04      0.00     97.14
</pre>
<p>Watch CPU activity evolve for 10 minutes and save data</p>
<pre>sar -o &lt;path_to_file&gt; 60 10
</pre>
<g:plusone href="https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/">Monitoring A System With Sysstat On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/monitoring-a-system-with-sysstat-on-centos/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Webalizer On CentOS</title>
		<link>https://lifelinux.com/how-to-install-webalizer-on-centos/</link>
					<comments>https://lifelinux.com/how-to-install-webalizer-on-centos/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 23 Nov 2010 08:33:23 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[analytics apache log]]></category>
		<category><![CDATA[analytics webserver log]]></category>
		<category><![CDATA[anlytics apache]]></category>
		<category><![CDATA[apache log]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[crontab command]]></category>
		<category><![CDATA[install webalizer]]></category>
		<category><![CDATA[vi command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=39</guid>

					<description><![CDATA[<p>The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser, in this article webalizer installed in Centos 5.4. 1. Download Webalizer [root@lifelinux src]# wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.20-01-src.tgz 2. Installing packages [root@lifelinux src]# yum -y install gcc gcc-c++ [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-webalizer-on-centos/">How To Install Webalizer On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>The Webalizer</strong> is a fast, free web server log file analysis program.  It produces highly detailed, easily configurable usage reports in HTML  format, for viewing with a standard web browser, in this article  webalizer installed in Centos 5.4.<span id="more-39"></span><br />
<strong>1. Download Webalizer</strong></p>
<pre>[root@lifelinux src]# wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.20-01-src.tgz</pre>
<p><strong>2. Installing packages</strong></p>
<pre>[root@lifelinux src]# yum -y install gcc gcc-c++ gd-devel</pre>
<p><strong>3. Compile GeoIP</strong></p>
<pre>[root@lifelinux src]# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz</pre>
<pre>[root@lifelinux src]# tar zxvf GeoIP.tar.gz</pre>
<pre>[root@lifelinux src]# ./configure

[root@lifelinux src]# make &amp;&amp; make install</pre>
<p>Move GeoIP library</p>
<pre>[root@lifelinux src]# cp /usr/local/lib/libGeoIP* /lib</pre>
<p><strong>4. Tarball package webalizer</strong></p>
<pre>[root@lifelinux src]# tar zxvf webalizer-2.20-01-src.tgz</pre>
<p><strong>3. Download GeoIP Database</strong></p>
<pre>[root@lifelinux src]# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz</pre>
<pre>[root@lifelinux src]# gunzip GeoIP.dat.gz</pre>
<pre>[root@lifelinux src]# mv ./GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat</pre>
<p><strong>5. Compile webalizer</strong></p>
<pre>[root@lifelinux src]# cd webalizer-2.20-01

[root@lifelinux webalizer-2.20-01]# ./configure --prefix=/usr/local/webalizer --sysconfdir=/usr/local/etc/webalizer --enable-geoip

[root@lifelinux webalizer-2.20-01]# make

[root@lifelinux webalizer-2.20-01]# make install</pre>
<p><strong>6. Create directory for configuration webalizer</strong></p>
<pre>[root@lifelinux webalizer-2.20-01]# mkdir /usr/local/etc/webalizer</pre>
<p><strong>7. Use default configuration and copying to your configuration</strong></p>
<pre>[root@lifelinux webalizer-2.20-01]# cp /usr/local/etc/webalizer/webalizer.conf.sample  /usr/local/etc/webalizer/yourdomain.com.conf</pre>
<p><strong>8. Create directory same with your document root</strong></p>
<pre>[root@lifelinux webalizer-2.20-01]# mkdir /var/www/example.com/webalizer</pre>
<p><strong>9. Edit this file</strong></p>
<pre>[root@lifelinux webalizer-2.20-01]# vi /usr/local/etc/webalizer/example.com.conf</pre>
<p>And find and changes the content</p>
<pre>LogFile /var/log/httpd/access_log</pre>
<p>Replace</p>
<pre>LogFile /var/log/httpd/example.com-access_log</pre>
<p>Find:</p>
<pre>OutputDir /var/www/usage/</pre>
<p>Replace</p>
<pre>OutputDir  /var/www/example.com/webalizer</pre>
<p>And find:</p>
<pre>HostName       localhost</pre>
<p>Replace</p>
<pre>HostName       example.com  # it depend on your web hostname</pre>
<p>Find</p>
<pre>#GeoIP           	yes

#GeoIPDatabase   	/usr/local/share/GeoIP/GeoIP.dat</pre>
<p>Replace</p>
<pre>GeoIP           	yes

GeoIPDatabase   	/usr/local/share/GeoIP/GeoIP.dat</pre>
<p><strong>10. Test your configuration with this syntax</strong></p>
<pre>[root@lifelinux webalizer-2.20-01]# for i in /usr/local/etc/webalizer/*.conf; do webalizer -c $i; done</pre>
<p><strong>11. Using this syntax for using crontab</strong>.</p>
<pre>[root@lifelinux webalizer-2.20-01]# vi /root/dowebalizer</pre>
<p>Add Code:</p>
<pre>#!/usr/bin/perl

use strict;

my @files = &lt;/usr/local/etc/webalizer/*.conf&gt;;

foreach my $file (@files) {

chomp($file);

system("/usr/local/bin/webalizer -c $file");

}</pre>
<p><strong>12. Using crontab</strong> for automatically updated</p>
<pre>[root@lifelinux webalizer-2.20-01]# crontab -e</pre>
<p>Add Code:</p>
<pre>1 * * * * /root/dowebalizer &gt;&gt;/dev/null 2&gt;&amp;1</pre>
<g:plusone href="https://lifelinux.com/how-to-install-webalizer-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-webalizer-on-centos/">How To Install Webalizer On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-install-webalizer-on-centos/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
