<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CPU Utilization based on user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900891#M282993</link>
    <description>Yes it is OK for 11.x&lt;BR /&gt;&lt;BR /&gt;Try this for user's cpu, total and proportion of users into total:&lt;BR /&gt;&lt;BR /&gt;awk '{if($4=="USERNAME"){p=1;getline;}if(p==1){cpu[$4]+=$11;tot+=$11}}END{for(u in cpu)print u,cpu[u],tot,(cpu[u]/tot)}' /tmp/top.txt&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 20 Nov 2006 04:59:12 GMT</pubDate>
    <dc:creator>Steve Lewis</dc:creator>
    <dc:date>2006-11-20T04:59:12Z</dc:date>
    <item>
      <title>CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900888#M282990</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This should be a easy 10 pointer... what is teh command to get total cpu utilization for user root or any other user.  I am planning to use this command in a script.  &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;-Hasim</description>
      <pubDate>Mon, 20 Nov 2006 03:45:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900888#M282990</guid>
      <dc:creator>Hasim.Baba</dc:creator>
      <dc:date>2006-11-20T03:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900889#M282991</link>
      <description>Two steps:&lt;BR /&gt;&lt;BR /&gt;1. top -s 10 -d 1 -n 1000 -f /tmp/top.txt&lt;BR /&gt;&lt;BR /&gt;2. awk '{if($4=="USERNAME"){p=1;getline;}if(p==1)cpu[$4]+=$11}END{for(u in cpu)print u,cpu[u]}' /tmp/top.txt&lt;BR /&gt;&lt;BR /&gt;These commands add up all the cpu and outputs the total for each user.&lt;BR /&gt;Remember to remove /tmp/top.txt between each run, otherwise top appends to the file.&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Nov 2006 04:24:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900889#M282991</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2006-11-20T04:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900890#M282992</link>
      <description>You da Man !!!&lt;BR /&gt;&lt;BR /&gt;I hope this runs on HPUX 11.x ? &lt;BR /&gt;&lt;BR /&gt;Also, can u please tell me if I have to sum the utilization for all the users it can be done wiht the same command ?&lt;BR /&gt;I am basically trying to make a script in which I total the utilzation for three users and than  compare if it does not take more than 30 percent of total utilzation for all the users.&lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;-Hasim&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Nov 2006 04:35:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900890#M282992</guid>
      <dc:creator>Hasim.Baba</dc:creator>
      <dc:date>2006-11-20T04:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900891#M282993</link>
      <description>Yes it is OK for 11.x&lt;BR /&gt;&lt;BR /&gt;Try this for user's cpu, total and proportion of users into total:&lt;BR /&gt;&lt;BR /&gt;awk '{if($4=="USERNAME"){p=1;getline;}if(p==1){cpu[$4]+=$11;tot+=$11}}END{for(u in cpu)print u,cpu[u],tot,(cpu[u]/tot)}' /tmp/top.txt&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Nov 2006 04:59:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900891#M282993</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2006-11-20T04:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900892#M282994</link>
      <description>Pipe the output into&lt;BR /&gt;&lt;BR /&gt;sort -rnk2 to get the worst users at the top of the list.&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Nov 2006 05:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900892#M282994</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2006-11-20T05:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Utilization based on user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900893#M282995</link>
      <description>Thank you !! &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;-Hasim</description>
      <pubDate>Mon, 20 Nov 2006 06:00:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization-based-on-user/m-p/3900893#M282995</guid>
      <dc:creator>Hasim.Baba</dc:creator>
      <dc:date>2006-11-20T06:00:48Z</dc:date>
    </item>
  </channel>
</rss>

