<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dan Langas</title>
	<atom:link href="http://danlangas.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://danlangas.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 08 May 2011 09:17:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='danlangas.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dan Langas</title>
		<link>http://danlangas.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://danlangas.wordpress.com/osd.xml" title="Dan Langas" />
	<atom:link rel='hub' href='http://danlangas.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Linux last reboot time and date find out</title>
		<link>http://danlangas.wordpress.com/2011/05/08/linux-last-reboot-time-and-date-find-out/</link>
		<comments>http://danlangas.wordpress.com/2011/05/08/linux-last-reboot-time-and-date-find-out/#comments</comments>
		<pubDate>Sun, 08 May 2011 09:17:35 +0000</pubDate>
		<dc:creator>Dan Langas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://danlangas.wordpress.com/?p=210</guid>
		<description><![CDATA[So how do you find Linux / UNIX system last reboot or shutdown date and time? The last utility will either list the sessions of specified users, ttys, and hosts, in reverse time order, or list the users logged in at a specified date and time. Each line of output contains the user name, the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=danlangas.wordpress.com&amp;blog=3414644&amp;post=210&amp;subd=danlangas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So how do you find Linux / UNIX system last reboot or shutdown date and time? The last utility will either list the sessions of specified users, ttys, and hosts, in reverse time order, or list the users logged in at a specified date and time. Each line of output contains the user name, the tty from which the session was conducted, any hostname, the start and stop times for the session, and the duration of the session.<br />
who command</p>
<p>You need to use who command, to print who is logged on. It also displays the time of last system boot. Use last command to display system reboot and shutdown date and time.<br />
$ who –b<br />
Output:</p>
<p>system boot  Apr 30 15:08</p>
<p>Use last command to display listing of last logged in users and system last reboot time and date:<br />
$ last reboot | less<br />
Or better try:<br />
$ last reboot | head -1<br />
Output:</p>
<p>reboot   system boot  2.6.15.4         Sun Apr 30 15:08 &#8211; 16:22  (01:13)</p>
<p>last command searches back through the file /var/log/wtmp and displays a list of all users logged in (and out) since that file was created. The pseudo user reboot logs in each time the system is rebooted. Thus last reboot command will show a log of all reboots since the log file was created.</p>
<p>To display last shutdown date and time use following command:<br />
$ last -x|grep shutdown | head -1<br />
Output:</p>
<p>shutdown system down  2.6.15.4         Sun Apr 30 13:31 &#8211; 15:08  (01:37)</p>
<p>Where,</p>
<p>    * -x: Display the system shutdown entries and run level changes.</p>
<p>For more information read last command man page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/danlangas.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/danlangas.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/danlangas.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=danlangas.wordpress.com&amp;blog=3414644&amp;post=210&amp;subd=danlangas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://danlangas.wordpress.com/2011/05/08/linux-last-reboot-time-and-date-find-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab6f0ef7ad2d7c5b8b0a6c1f182b5b02?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">danlangas</media:title>
		</media:content>
	</item>
		<item>
		<title>SSH Loops</title>
		<link>http://danlangas.wordpress.com/2009/04/03/ssh-loops/</link>
		<comments>http://danlangas.wordpress.com/2009/04/03/ssh-loops/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 08:00:30 +0000</pubDate>
		<dc:creator>Dan Langas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://danlangas.wordpress.com/?p=152</guid>
		<description><![CDATA[A common need you have when there are more than a few servers in your environment is to run do the same command on more than one machine. When I first had this problem, I came up with a pretty simple shell script: [user1@machine1 ~]$ cat ssh_loop.sh #!/bin/sh $HOSTS="machine1, machine2, machine3"; for i in $HOSTS; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=danlangas.wordpress.com&amp;blog=3414644&amp;post=152&amp;subd=danlangas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A common need you have when there are more than a few servers in your environment is to run do the same command on more than one machine. When I first had this problem, I came up with a pretty simple shell script:</p>
<p><code>[user1@machine1 ~]$ cat ssh_loop.sh<br />
#!/bin/sh</code></p>
<p><code>$HOSTS="machine1, machine2, machine3";</code></p>
<p><code>for i in $HOSTS;<br />
	do ssh $i uname -a;<br />
		done;<br />
	[user1@machine1 ~]$ </code></p>
<p>     This one-liner iterates through each machine I’ve<br />
listed in the HOSTS environment variable and runs<br />
uname -a. You can, of course, replace uname -a<br />
with any command-line command that you would<br />
want to run on the hosts. For instance, one need I<br />
had was to keep all of my Debian servers up to<br />
date. I created a small shell script on each Debian<br />
host called /usr/local/bin/apt-automate:</p>
<p><code>[user1@machine ~]$ cat automate.sh<br />
#!/bin/sh<br />
apt-get update &amp;&amp; apt-get -u upgrade<br />
[user1@machine ~]$ </code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/danlangas.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/danlangas.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/danlangas.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=danlangas.wordpress.com&amp;blog=3414644&amp;post=152&amp;subd=danlangas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://danlangas.wordpress.com/2009/04/03/ssh-loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab6f0ef7ad2d7c5b8b0a6c1f182b5b02?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">danlangas</media:title>
		</media:content>
	</item>
	</channel>
</rss>
