<?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: Any one can explain this？ in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001892#M98321</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;first choice:&lt;BR /&gt;come to lower numbers, in computing the values you use not in KB but MB - so you have a factor of 1/1024.&lt;BR /&gt;&lt;BR /&gt;Another alternative would be the use of dc/awk/perl to get 64Bit integer arithmetik or floating point calculation.&lt;BR /&gt;E.G.&lt;BR /&gt;print "47816844 100*p" | dc&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
    <pubDate>Mon, 11 Sep 2006 04:48:54 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2006-09-11T04:48:54Z</dc:date>
    <item>
      <title>Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001888#M98317</link>
      <description>thanks&lt;BR /&gt;&lt;BR /&gt;bcdb-p03:/script_file/OS#de_percent=$(( 47816844 * 10 )) &lt;BR /&gt;bcdb-p03:/script_file/OS#echo $de_percent&lt;BR /&gt;478168440&lt;BR /&gt;bcdb-p03:/script_file/OS#de_percent=$(( 47816844 * 100 ))&lt;BR /&gt;bcdb-p03:/script_file/OS#echo $de_percent                &lt;BR /&gt;486717104</description>
      <pubDate>Fri, 08 Sep 2006 02:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001888#M98317</guid>
      <dc:creator>okyour</dc:creator>
      <dc:date>2006-09-08T02:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001889#M98318</link>
      <description>Probably owe to overrun.&lt;BR /&gt;I think the shell arithmetics only can handle 2^31 as maximum integer value (I think one bit is required for the sign)&lt;BR /&gt;The man page should mention the limitations.&lt;BR /&gt;You could resort to bc or perl, python for big ints.</description>
      <pubDate>Fri, 08 Sep 2006 02:53:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001889#M98318</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-09-08T02:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001890#M98319</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;A slight overrun will lead to negative numbers.&lt;BR /&gt;Now remember, that a '-' may be interpreted by the 'echo' or 'print' as an option.&lt;BR /&gt;&lt;BR /&gt;My Sun ksh (64Bit) tells:&lt;BR /&gt;&lt;BR /&gt;print $((47816844 * 100000000000)) &lt;BR /&gt;4781684400000000000&lt;BR /&gt;print $((47816844 * 1000000000000))&lt;BR /&gt;&lt;NOTHING visible=""&gt;&lt;BR /&gt;print -- "$((47816844 * 1000000000000))"&lt;BR /&gt;-7523388221128654848&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/NOTHING&gt;</description>
      <pubDate>Fri, 08 Sep 2006 05:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001890#M98319</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-08T05:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001891#M98320</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;  Thanks for the reply. but how can I resolve this question,I need to write a script like this to check the memory treadhold,but if the memory is large,the script will get wrong result.plz give me further help&lt;BR /&gt;&lt;BR /&gt;########### check memory added 09/04/2007&lt;BR /&gt;&lt;BR /&gt;thresholdmem=10&lt;BR /&gt;de_phy=`more /var/adm/syslog/syslog.log|grep -i phy|grep available|awk '{print $7}'`&lt;BR /&gt;de_free=`more $State_File |grep Memory:|awk '{print $8}'|sed 's/K//p'`&lt;BR /&gt;de_percent=$(( $de_free * 100 / $de_phy ))&lt;BR /&gt;&lt;BR /&gt;if [ $thresholdmem -gt $de_percent ] &lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;  echo "Current free Memory is : $de_percent %" &amp;gt;&amp;gt; $output_file&lt;BR /&gt;  echo "Critical: Found that there is Memory issue! plz check it ASAP!!\n" &amp;gt;&amp;gt; $output_file&lt;BR /&gt;  grep -i USERNAME $State_File &amp;gt;&amp;gt; $output_file&lt;BR /&gt;&lt;BR /&gt;  typeset i=1&lt;BR /&gt;  while read -r yy &lt;BR /&gt;    do&lt;BR /&gt;    if [ $i -gt 15 ]&lt;BR /&gt;    then&lt;BR /&gt;    printf  "%s \n" "$yy" &amp;gt;&amp;gt; $State_File2&lt;BR /&gt;    fi&lt;BR /&gt;&lt;BR /&gt;    if [ $i -gt 1115 ]&lt;BR /&gt;    then&lt;BR /&gt;    break&lt;BR /&gt;    fi&lt;BR /&gt;    let i=i+1&lt;BR /&gt;  done &amp;lt; $State_File &lt;BR /&gt;&lt;BR /&gt;sort -r -k 8,8 $State_File2 &amp;gt;&amp;gt; $new_file2&lt;BR /&gt;&lt;BR /&gt;  typeset a=1&lt;BR /&gt;  while read -r xx&lt;BR /&gt;    do&lt;BR /&gt;    if [ $a -gt 0 ]&lt;BR /&gt;    then&lt;BR /&gt;    printf  "%s \n" "$xx" &amp;gt;&amp;gt; $output_file&lt;BR /&gt;    fi&lt;BR /&gt;&lt;BR /&gt;    if [ $a -gt 20 ]&lt;BR /&gt;    then&lt;BR /&gt;    break&lt;BR /&gt;    fi&lt;BR /&gt;    let a=a+1&lt;BR /&gt;  done &amp;lt; $new_file2</description>
      <pubDate>Mon, 11 Sep 2006 03:37:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001891#M98320</guid>
      <dc:creator>okyour</dc:creator>
      <dc:date>2006-09-11T03:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001892#M98321</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;first choice:&lt;BR /&gt;come to lower numbers, in computing the values you use not in KB but MB - so you have a factor of 1/1024.&lt;BR /&gt;&lt;BR /&gt;Another alternative would be the use of dc/awk/perl to get 64Bit integer arithmetik or floating point calculation.&lt;BR /&gt;E.G.&lt;BR /&gt;print "47816844 100*p" | dc&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Mon, 11 Sep 2006 04:48:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001892#M98321</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-11T04:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Any one can explain this？</title>
      <link>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001893#M98322</link>
      <description>Problem solved</description>
      <pubDate>Mon, 11 Sep 2006 05:48:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/any-one-can-explain-this/m-p/5001893#M98322</guid>
      <dc:creator>okyour</dc:creator>
      <dc:date>2006-09-11T05:48:56Z</dc:date>
    </item>
  </channel>
</rss>

