<?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: fuser -ku /dev/pts/0 command does not wok in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926329#M286722</link>
    <description>Chris,&lt;BR /&gt;the fuser -k sends a kill -9 level, which terminates the process without caring about the niceities, such as cleaning up the utmp and wtmp files.&lt;BR /&gt;&lt;BR /&gt;This is were this problem can arise from.&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;&lt;BR /&gt;So far you have never awarded any points !&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Jan 2007 06:33:08 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2007-01-15T06:33:08Z</dc:date>
    <item>
      <title>fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926328#M286721</link>
      <description>Hi,&lt;BR /&gt;  I have a cron job that will kill users that are active for 24 hours. My cron job contains fuser -ku "/dev/pts/0". I noticed that after the cron has ran, the user with pts/0 is still present in "who" command. when I manually ran the script, the user is killed. Is it normal for fuser -ku command to work only after 2nd and 3rd execution?&lt;BR /&gt;regards,&lt;BR /&gt;chris</description>
      <pubDate>Mon, 15 Jan 2007 06:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926328#M286721</guid>
      <dc:creator>ChrisCiti</dc:creator>
      <dc:date>2007-01-15T06:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926329#M286722</link>
      <description>Chris,&lt;BR /&gt;the fuser -k sends a kill -9 level, which terminates the process without caring about the niceities, such as cleaning up the utmp and wtmp files.&lt;BR /&gt;&lt;BR /&gt;This is were this problem can arise from.&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;&lt;BR /&gt;So far you have never awarded any points !&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 06:33:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926329#M286722</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-15T06:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926330#M286723</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;I also have similar script working for last &lt;BR /&gt;6 years.&lt;BR /&gt;&lt;BR /&gt;Sometime at command line&lt;BR /&gt;&lt;BR /&gt;fuser -ku &lt;TERMINAL_DEV_FILE&gt;&lt;BR /&gt;&lt;BR /&gt;won't kill if login is "old".&lt;BR /&gt;&lt;BR /&gt;Pl. give details of ur script.&lt;BR /&gt;&lt;BR /&gt;-Santosh&lt;BR /&gt;&lt;/TERMINAL_DEV_FILE&gt;</description>
      <pubDate>Mon, 15 Jan 2007 06:42:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926330#M286723</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2007-01-15T06:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926331#M286724</link>
      <description>Hi Peter,&lt;BR /&gt;  thanks for providing the procedure on how to award points. :)&lt;BR /&gt;  But is it ok to re-run the fuser -ku /dev/pts/0 until its killed? 2 to 3 times?&lt;BR /&gt;regards,&lt;BR /&gt;chris&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 06:45:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926331#M286724</guid>
      <dc:creator>ChrisCiti</dc:creator>
      <dc:date>2007-01-15T06:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926332#M286725</link>
      <description>Hi Mhaskar,&lt;BR /&gt; My script will grep for users with "rp" and redirected to a /tmp/file. Then it will check for the login time. If the login time is equal to a specific value that translates to 24 hours, the /pts/0 (for ex.) will be killed using the fuser -ku "/dev/pts/0". This script will be run using cron twice daily. Sometimes the user was killed sometimes its not.&lt;BR /&gt;regards,&lt;BR /&gt;chris</description>
      <pubDate>Mon, 15 Jan 2007 06:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926332#M286725</guid>
      <dc:creator>ChrisCiti</dc:creator>
      <dc:date>2007-01-15T06:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926333#M286726</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;Have u tested the script, i.e. login to&lt;BR /&gt;a terminal and keep it idle for some time &lt;BR /&gt;set in ur script values for this test session&lt;BR /&gt;and run script manually,&lt;BR /&gt;insert set -vx at the beginning of ur script&lt;BR /&gt;this will show debugging info. of ur script.&lt;BR /&gt;Go through script attached herewith which&lt;BR /&gt;I use to run since last 6 years without&lt;BR /&gt;any problem. Which Warns and then kills the &lt;BR /&gt;terminals.&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Mon, 15 Jan 2007 07:25:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926333#M286726</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2007-01-15T07:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926334#M286727</link>
      <description>I think there is problem in attachment.&lt;BR /&gt;Againing uploading it.</description>
      <pubDate>Mon, 15 Jan 2007 07:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926334#M286727</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2007-01-15T07:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926335#M286728</link>
      <description>&lt;!--!*#--&gt;same problem,&lt;BR /&gt;&lt;BR /&gt;Copying here the contents.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------&lt;BR /&gt;## Extracts logged-in terminals .&lt;BR /&gt;&lt;BR /&gt;for Term in `who -u|cut -c 12-20`&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;## To get idle time of given terminal .&lt;BR /&gt;&lt;BR /&gt;        Idle=`who -u|grep $Term|cut -c 41-42`&lt;BR /&gt;&lt;BR /&gt;## To get login name of given terminal .&lt;BR /&gt;&lt;BR /&gt;        Log=`who -u|grep $Term|cut -c 1-10`&lt;BR /&gt;&lt;BR /&gt;## To get LTS of given terminal .&lt;BR /&gt;&lt;BR /&gt;        lts=`who -u|grep $Term|cut -c 15`&lt;BR /&gt;&lt;BR /&gt;## If login is not csms or mtnlbckp or LTS is not P and idle time is&lt;BR /&gt;## more than 10 minutes then sends warning message to that terminal .&lt;BR /&gt;&lt;BR /&gt;        if [  \( $Idle -gt 10 -a $Idle -le 25 \)  -a ! \( $Log = csms -o $Log = ccbs -o $Log = oracle -o $lts = p  -o $Term = console -o $Term = ttytf -o $Term = ttyt6 -o $Term = ttys3 -o $Term = ttyv5 -o $Term = ttyvc \)  ]&lt;BR /&gt;        then&lt;BR /&gt;                alm=1&lt;BR /&gt;&lt;BR /&gt;## Sends Audible Alarm to idle terminal .&lt;BR /&gt;&lt;BR /&gt;                while [ $alm -lt 5 ]&lt;BR /&gt;                do&lt;BR /&gt;                        echo "\a\c" &amp;gt; /dev/$Term  ## Sends Alarm&lt;BR /&gt;                        sleep 1&lt;BR /&gt;                        alm=`expr $alm + 1`&lt;BR /&gt;                done&lt;BR /&gt;&lt;BR /&gt;## Sends message to idle terminal .&lt;BR /&gt;&lt;BR /&gt;                echo "\n\t\t\t`date`" &amp;gt;/dev/$Term&lt;BR /&gt;                echo "\n\t\033[5mYou are not using the system for last $Idle minutes , press &lt;ENTER&gt; \n\tand start using it or Logout immediately !!!\033[0m\n" &amp;gt; /dev/$Term&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;## Saves details to logfile idle.log .&lt;BR /&gt;&lt;BR /&gt;                echo "\n`date`\nUser $Log at $Term is idle for $Idle minutes !"&amp;gt;&amp;gt; /Mi_cron/cron_log/Idle.log&lt;BR /&gt;&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;## Terminates the terminal if it is idle more than specified time after&lt;BR /&gt;## warning .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        if [  $Idle -gt 25  -a ! \( $Log = csms -o $Log = ccbs -o  $Log = oracle -o $lts = p -o $Term = console  -o $Term = ttytf -o  $Term = ttyt6 -o $Term = ttys3 -o $Term = ttyv5 -o $Term = ttyvc \)  ]&lt;BR /&gt;        then&lt;BR /&gt;&lt;BR /&gt;## Terminates the terminal .&lt;BR /&gt;&lt;BR /&gt;                /usr/sbin/fuser -ku /dev/$Term &amp;gt; /Mi_cron/cron_log/Process.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;## Saves details in logfile kill.log .&lt;BR /&gt;&lt;BR /&gt;                echo "\n`date`\nUser $Log at $Term  idle for $Idle minutes, terminated !"&amp;gt;&amp;gt; /Mi_cron/cron_log/Kill.log&lt;BR /&gt;&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;&lt;/ENTER&gt;</description>
      <pubDate>Mon, 15 Jan 2007 07:34:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926335#M286728</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2007-01-15T07:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: fuser -ku /dev/pts/0 command does not wok</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926336#M286729</link>
      <description>Hi ,&lt;BR /&gt;  Thanks for the sample script. My script is actually running fine. I think the problem is with the fuser command. Sometimes the user is get killed on the first run of the script sometimes on the second run. &lt;BR /&gt;regards,&lt;BR /&gt;chris</description>
      <pubDate>Tue, 16 Jan 2007 01:24:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fuser-ku-dev-pts-0-command-does-not-wok/m-p/3926336#M286729</guid>
      <dc:creator>ChrisCiti</dc:creator>
      <dc:date>2007-01-16T01:24:51Z</dc:date>
    </item>
  </channel>
</rss>

