<?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: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082665#M30306</link>
    <description>hi John and Stuart!&lt;BR /&gt;&lt;BR /&gt;Sorry for this late feedback on your replies.&lt;BR /&gt;&lt;BR /&gt;Our main concern is making sure that the NPROC has been properly set. Being rather "new" to the use of Linux at the Enterprise/Production level, my knowledge of resource monitoring at the OS level is rather limited. I thought there was some utility that would easily help me collect the required data.&lt;BR /&gt;&lt;BR /&gt;In fact, i am already using NMON for monitoring of the server resources.&lt;BR /&gt;&lt;BR /&gt;Well, plotting of the data into a meaningful graph using a particular tool is not really of the concern here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I think "ps -U oracle -ocmd= | wc -l" as mentioned by Stuart will do for the moment ...unless there is something better...&lt;BR /&gt;&lt;BR /&gt;thanking you all for your replies and also those who had a glance at my post too.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;BR /&gt;</description>
    <pubDate>Wed, 10 Oct 2007 00:24:31 GMT</pubDate>
    <dc:creator>Yogeeraj_1</dc:creator>
    <dc:date>2007-10-10T00:24:31Z</dc:date>
    <item>
      <title>How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082660#M30301</link>
      <description>Dear Experts!&lt;BR /&gt;&lt;BR /&gt;I need to monitor the system (RHEL4-U5) so as to determine if the NPROC for the oracle user has been properly set.&lt;BR /&gt;&lt;BR /&gt;In fact, I will need to gather resource usage data and plot a graph on its utilisation over a period of time. What is the best way to do so?&lt;BR /&gt;&lt;BR /&gt;[root@server home]# grep -i nproc /etc/security/limits.conf&lt;BR /&gt;#        - nproc - max number of processes&lt;BR /&gt;#@student        hard    nproc           20&lt;BR /&gt;#@faculty        soft    nproc           20&lt;BR /&gt;#@faculty        hard    nproc           50&lt;BR /&gt;#ftp             hard    nproc           0&lt;BR /&gt;oracle           soft    nproc           2047&lt;BR /&gt;oracle           hard    nproc           16384&lt;BR /&gt;[root@server home]#&lt;BR /&gt;&lt;BR /&gt;Thanking you in advance for replies.&lt;BR /&gt;&lt;BR /&gt;kind regards,&lt;BR /&gt;yogeeraj</description>
      <pubDate>Mon, 08 Oct 2007 07:20:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082660#M30301</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-10-08T07:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082661#M30302</link>
      <description>I'm not sure why you want to graph a file that should not change, you could audit/checksum/tripwire the file. But anyway, to graph a file, you could use MRTG + External Monitoring Scripts:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html" target="_blank"&gt;http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html&lt;/A&gt;</description>
      <pubDate>Mon, 08 Oct 2007 17:20:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082661#M30302</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2007-10-08T17:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082662#M30303</link>
      <description>&lt;!--!*#--&gt;I think you want the results of the "ps -au &lt;USER&gt;" command.&lt;BR /&gt;&lt;BR /&gt;So, if you wanted to check all of the users defined in the limits.conf file;&lt;BR /&gt;&lt;BR /&gt;I wrote the following script as a starting point.  Here's an example run of user "john" running 2 processes and user "squid" running nothing:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; /tmp/get_procs&lt;BR /&gt;john:&lt;BR /&gt;  hard 20&lt;BR /&gt;  soft 10&lt;BR /&gt;  actv 2&lt;BR /&gt;squid:&lt;BR /&gt;  hard 18&lt;BR /&gt;  soft 10&lt;BR /&gt;  actv 0&lt;BR /&gt;&lt;BR /&gt;If you want single line output:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; /tmp/get_procs -l&lt;BR /&gt;john: hard 20 soft 10 actv 2&lt;BR /&gt;squid: hard 18 soft 10 actv 0&lt;BR /&gt;&lt;BR /&gt;If you want the above data usable for graphing in an Excel or Open Office spreadsheet, just put in "|" pipe delimiters, or "," commas (your preference) in the output instead of " " spaces.&lt;BR /&gt;&lt;BR /&gt;Then, just put it in a cron job, accumulating the data into a file somewhere of your choosing.  Of course, you'd need to log rotating tool to clean it up every day (See the HPUX Porting Archives).&lt;BR /&gt;&lt;BR /&gt;The script has a dependency that you are consistent in the order of putting in soft and hard limits.  Also, it doesn't work for the "grouping" function of the security file, because in your example, it looked like your just interested in user "oracle" at the time.&lt;BR /&gt;&lt;BR /&gt;Here's whats in my security file:&lt;BR /&gt;john        hard    nproc           20&lt;BR /&gt;john        soft    nproc           10&lt;BR /&gt;squid       hard    nproc           18&lt;BR /&gt;squid       soft    nproc           10&lt;BR /&gt;&lt;BR /&gt;Here's the bash script:&lt;BR /&gt;It's a bit klunky at points, and could be cleaned up, but it's what I could do in a hurry.&lt;BR /&gt;-----------------------------------------&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;#&lt;BR /&gt;# get_procs - gets process info about items secured by /etc/security/limits.conf&lt;BR /&gt;#&lt;BR /&gt;# Args: if a "-l" is passed as the first argument, it returns a single line &lt;BR /&gt;#       display per user defined in security file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ONELINE=FALSE&lt;BR /&gt;if [ $# -gt 0 ]; then&lt;BR /&gt;   if [ $1 = "-l" ]; then&lt;BR /&gt;      ONELINE=TRUE&lt;BR /&gt;   fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;get_procs() {&lt;BR /&gt;   if [ $ONELINE = "FALSE" ]; then&lt;BR /&gt;      for i in `grep -v "^#" /etc/security/limits.conf | cut -d " " -f 1| sort | uniq`&lt;BR /&gt;      do&lt;BR /&gt;        echo $i:&lt;BR /&gt;        cat /etc/security/limits.conf | grep "^${i}" | awk '{ print "  "$2" "$4}'&lt;BR /&gt;        echo "  "actv `ps -eo user | grep $i| wc -l`&lt;BR /&gt;      done&lt;BR /&gt;   else&lt;BR /&gt;      TMPFILE=/var/tmp/get_procs.$$&lt;BR /&gt;      if [ -f $TMPFILE ] ; then&lt;BR /&gt;         rm -f $TMPFILE || ( echo Error deleting $TMPFILE ; exit 1)&lt;BR /&gt;      fi&lt;BR /&gt;      for i in `grep -v "^#" /etc/security/limits.conf | cut -d " " -f 1| sort | uniq`&lt;BR /&gt;      do&lt;BR /&gt;        echo $i: &amp;gt; $TMPFILE|| ( echo Error creating $TMPFILE ; exit 2)&lt;BR /&gt;        grep "^${i}" /etc/security/limits.conf | awk '{ print $2" "$4}' &amp;gt;&amp;gt; $TMPFILE&lt;BR /&gt;        echo actv `ps -eo user |grep $i | wc -l` &amp;gt;&amp;gt; $TMPFILE&lt;BR /&gt;        set `cat $TMPFILE`&lt;BR /&gt;        echo $1 $2 $3 $4 $5 $6 $7 $8 $9&lt;BR /&gt;        rm -f $TMPFILE || ( echo Error deleting $TMPFILE ; exit 3)&lt;BR /&gt;      done&lt;BR /&gt;   fi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;get_procs&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;&lt;BR /&gt;John&lt;/USER&gt;</description>
      <pubDate>Mon, 08 Oct 2007 18:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082662#M30303</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-10-08T18:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082663#M30304</link>
      <description>Yogeeraj,&lt;BR /&gt;&lt;BR /&gt;It seems that I didn't quite answer your question - What else are you looking for?  Do you need help with an example scripts for comma delimited?  Cron example?  Let us know.</description>
      <pubDate>Tue, 09 Oct 2007 09:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082663#M30304</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-10-09T09:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082664#M30305</link>
      <description>When you exceed the limits, the user gets warnings set to it's TTY (Resource temporarily unavailable).  I poked through logs and couldn't find it anywhere, so I upped the log levels to see what I could find..  Still nothing.&lt;BR /&gt;&lt;BR /&gt;What I did note however was that there is no 'soft' nproc limit.  Both 'soft' and 'hard' references are hard (well, when spawning from 'bash').&lt;BR /&gt;&lt;BR /&gt;Perhaps just graphing the output of the simple command:&lt;BR /&gt;&lt;BR /&gt;ps -U oracle -ocmd= | wc -l&lt;BR /&gt;&lt;BR /&gt;will suffice (You can use that command with MRTG as mentioned above).</description>
      <pubDate>Tue, 09 Oct 2007 21:40:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082664#M30305</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2007-10-09T21:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor if my NPROC has been undersized in the /etc/security/limits.conf</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082665#M30306</link>
      <description>hi John and Stuart!&lt;BR /&gt;&lt;BR /&gt;Sorry for this late feedback on your replies.&lt;BR /&gt;&lt;BR /&gt;Our main concern is making sure that the NPROC has been properly set. Being rather "new" to the use of Linux at the Enterprise/Production level, my knowledge of resource monitoring at the OS level is rather limited. I thought there was some utility that would easily help me collect the required data.&lt;BR /&gt;&lt;BR /&gt;In fact, i am already using NMON for monitoring of the server resources.&lt;BR /&gt;&lt;BR /&gt;Well, plotting of the data into a meaningful graph using a particular tool is not really of the concern here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I think "ps -U oracle -ocmd= | wc -l" as mentioned by Stuart will do for the moment ...unless there is something better...&lt;BR /&gt;&lt;BR /&gt;thanking you all for your replies and also those who had a glance at my post too.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2007 00:24:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-monitor-if-my-nproc-has-been-undersized-in-the-etc/m-p/4082665#M30306</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-10-10T00:24:31Z</dc:date>
    </item>
  </channel>
</rss>

