<?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>opensourcetutor.com &#187; awk</title>
	<atom:link href="http://www.opensourcetutor.com/tag/awk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opensourcetutor.com</link>
	<description>On Linux, Web Development, Joomla and Magento commerce</description>
	<lastBuildDate>Fri, 20 Aug 2010 06:42:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Bash command to determine multiple logins sorted by user with the most logins</title>
		<link>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/</link>
		<comments>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/#comments</comments>
		<pubDate>Thu, 29 May 2008 01:41:09 +0000</pubDate>
		<dc:creator>salubrium</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[hp-ux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maxusers]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/</guid>
		<description><![CDATA[



Here &#8217;tis
w &#124; awk &#8216;{a[$1]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; &#124; sort -rn &#124; head
stumbled on this issue with a HP-UX server we run where the maxusers kernel paramater is set to 600 (512 by default). To change this setting, requires a reboot of the server (something not easily achievable at midday with 600 users logged in). You can change kernel parameters via SAM in HP-UX
This is a slight modification of the 1 liner that sorts your bash history by commands used:
history &#124; awk &#8216;{a[$2]++}END{for(i in a){print a[i] &#8221; ...]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9469051832075629";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//2007-05-22: opensourcetutor.com
google_ad_channel = "3549963802";
google_color_border = "FFF";
google_color_bg = "FFF";
google_color_link = "333";
google_color_text = "CCCCCC";
google_color_url = "999999";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Here &#8217;tis</p>
<blockquote><p>w | awk &#8216;{a[$1]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; | sort -rn | head</p></blockquote>
<p>stumbled on this issue with a HP-UX server we run where the maxusers kernel paramater is set to 600 (512 by default). To change this setting, requires a reboot of the server (something not easily achievable at midday with 600 users logged in). You can change kernel parameters via SAM in HP-UX</p>
<p>This is a slight modification of the 1 liner that sorts your bash history by commands used:</p>
<blockquote><p>history | awk &#8216;{a[$2]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; | sort -rn | head</p></blockquote>
<p>Here&#8217;s some examples of my own from 2 machines:</p>
<p>235 ll<br />163 cd<br />149 grep<br />37 vi<br />32 for<br />31 du<br />26 rm<br />23 tail<br />21 htop<br />20 /etc/init.d/httpd</p>
<p>Here&#8217;s my home machine (I use pkill when I login to the same user desktop remotely via NX to kill evolution in the console session) :</p>
<p>109 ll<br />42 sudo<br />35 locate<br />35 cd<br />24 pkill<br />17 more<br />15 vi<br />15 unison<br />15 ssh<br />14 echo</p>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/bash" rel="tag">bash</a>, <a class="performancingtags" href="http://technorati.com/tag/hp-ux" rel="tag">hp-ux</a>, <a class="performancingtags" href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a class="performancingtags" href="http://technorati.com/tag/one-liner" rel="tag">one-liner</a>, <a class="performancingtags" href="http://technorati.com/tag/awk" rel="tag">awk</a>, <a class="performancingtags" href="http://technorati.com/tag/maxusers" rel="tag">maxusers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
