<?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: user id processes not get killed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377389#M348103</link>
    <description>ohh.. looks like they are defunct process.&lt;BR /&gt;What does ps -ef |grep 16316 shows..?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;john</description>
    <pubDate>Thu, 12 Mar 2009 07:10:30 GMT</pubDate>
    <dc:creator>john123</dc:creator>
    <dc:date>2009-03-12T07:10:30Z</dc:date>
    <item>
      <title>user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377388#M348102</link>
      <description>Hi all &lt;BR /&gt;   we are using ssh for all of our servers.&lt;BR /&gt;   their is one problem we have no users login in server but still it shows some user in who output.When i kill that process it is not getting killed.So user not able to login because we have the policy that user can login only 3 times.Please see output below and help me .Its urgent.&lt;BR /&gt;&lt;BR /&gt;smsc2@root:/&amp;gt;who -u&lt;BR /&gt;amogh      pts/0        Feb  3 14:43  old   16316  172.16.18.184&lt;BR /&gt;amogh      pts/3        Jan 30 16:27  old    5956  172.16.202.154&lt;BR /&gt;srikanth   pts/2        Mar 12 09:58   .    20506  172.16.18.184&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;smsc2@root:/&amp;gt;kill -9 16316&lt;BR /&gt;kill: 16316: The specified process does not exist.&lt;BR /&gt;smsc2@root:/&amp;gt;kill -9 5956&lt;BR /&gt;kill: 5956: The specified process does not exist.&lt;BR /&gt;You have mail in /var/mail/root&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Mar 2009 07:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377388#M348102</guid>
      <dc:creator>Abhilash Krishnan</dc:creator>
      <dc:date>2009-03-12T07:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377389#M348103</link>
      <description>ohh.. looks like they are defunct process.&lt;BR /&gt;What does ps -ef |grep 16316 shows..?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;john</description>
      <pubDate>Thu, 12 Mar 2009 07:10:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377389#M348103</guid>
      <dc:creator>john123</dc:creator>
      <dc:date>2009-03-12T07:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377390#M348104</link>
      <description>It doestn't show any process.</description>
      <pubDate>Thu, 12 Mar 2009 07:12:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377390#M348104</guid>
      <dc:creator>Abhilash Krishnan</dc:creator>
      <dc:date>2009-03-12T07:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377391#M348105</link>
      <description>&amp;gt;/var/adm/btmp&lt;BR /&gt;&amp;gt;/var/adm/wtmp&lt;BR /&gt;&lt;BR /&gt;After some time&lt;BR /&gt;&lt;BR /&gt;# who -u</description>
      <pubDate>Thu, 12 Mar 2009 07:25:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377391#M348105</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-12T07:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377392#M348106</link>
      <description>process could be zombie which you cannot kill it. Zombie process will not consume any resources other than entry in process table.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Mar 2009 07:36:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377392#M348106</guid>
      <dc:creator>Ganesan R</dc:creator>
      <dc:date>2009-03-12T07:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377393#M348107</link>
      <description>/var/adm/btmp&lt;BR /&gt;sh: /var/adm/btmp: Execute permission denied.&lt;BR /&gt;&lt;BR /&gt;it could be zombe but i have to remove that entry from utmp</description>
      <pubDate>Thu, 12 Mar 2009 08:10:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377393#M348107</guid>
      <dc:creator>Abhilash Krishnan</dc:creator>
      <dc:date>2009-03-12T08:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377394#M348108</link>
      <description>Your /etc/utmp and/or /etc/utmpx files may have been corrupted. Older versions of HP-UX have only /etc/utmp, modern ones have /etc/utmpx too.&lt;BR /&gt;&lt;BR /&gt;If all users have now logged out, you can clear the utmp and utmpx files. The command to do this is "&amp;gt; /etc/utmp" for the utmp file and "&amp;gt; /etc/utmpx" for the utmpx file.&lt;BR /&gt;After doing this, you should log out. At next login, the utmp file(s) will be automatically recreated.&lt;BR /&gt;&lt;BR /&gt;Normally the process that is managing the user's login session will write to /etc/utmp and/or /etc/utmpx when it exits, to mark that the session has ended. When someone logs in again and gets the same pts/number, the session record is automatically recycled. But if the session is ended with "kill -9", this process may be disrupted and the incorrect session information may remain until the next reboot or until the utmp files are manually cleared.&lt;BR /&gt;&lt;BR /&gt;You should use "kill -HUP" and/or just an ordinary "kill" (without -9) to remove old sessions whenever possible. Use "kill -9" only in special cases, when the gentler forms won't work. An interactive shell won't usually die with an ordinary "kill", but will die with "kill -HUP".&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 12 Mar 2009 08:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377394#M348108</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-03-12T08:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377395#M348109</link>
      <description>You missed "&amp;gt;" sign&lt;BR /&gt;&lt;BR /&gt;# cd /var/adm&lt;BR /&gt;# cat /dev/null &amp;gt; wtmp &lt;BR /&gt;# cat /dev/null &amp;gt; btmp&lt;BR /&gt;# login&lt;BR /&gt;&lt;BR /&gt;# who -u</description>
      <pubDate>Thu, 12 Mar 2009 08:20:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377395#M348109</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-12T08:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377396#M348110</link>
      <description>Oops.. Matti.. is correct.&lt;BR /&gt;I went via man page of who command&lt;BR /&gt;&lt;BR /&gt; DESCRIPTION&lt;BR /&gt;      The who command can list the user's name, terminal line, login time,&lt;BR /&gt;      elapsed time since input activity occurred on the line, the user's&lt;BR /&gt;      host name, and the process-ID of the command interpreter (shell) for&lt;BR /&gt;      each current system user.  It examines the "/etc/utmp" file to obtain&lt;BR /&gt;      its information.  If file is given, that file is examined.  Usually,&lt;BR /&gt;      file is /var/adm/wtmp, which contains a history of all of the logins&lt;BR /&gt;      since the file was last created.&lt;BR /&gt;&lt;BR /&gt;## you could follow Matti's plan.&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Mar 2009 08:26:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377396#M348110</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-12T08:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377397#M348111</link>
      <description>Hi MK thanks now who output not showing any user.Can i know when users are login how i can remove old users without affecting login users.</description>
      <pubDate>Thu, 12 Mar 2009 09:14:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377397#M348111</guid>
      <dc:creator>Abhilash Krishnan</dc:creator>
      <dc:date>2009-03-12T09:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377398#M348112</link>
      <description>Same way which you followed.&lt;BR /&gt;&lt;BR /&gt;# who -u&lt;BR /&gt;&lt;BR /&gt;If you like to remove those users&lt;BR /&gt;&lt;BR /&gt;# kill -9 &lt;PID&gt;&lt;/PID&gt;</description>
      <pubDate>Thu, 12 Mar 2009 09:42:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377398#M348112</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-12T09:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377399#M348113</link>
      <description>Also&lt;BR /&gt;&lt;BR /&gt;" I have assigned points to   12  of   91  responses to  my questions.  "&lt;BR /&gt;&lt;BR /&gt;Please assign point to your thread if you get your answers.&lt;BR /&gt;&lt;BR /&gt;No points for this please.</description>
      <pubDate>Thu, 12 Mar 2009 09:44:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377399#M348113</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2009-03-12T09:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377400#M348114</link>
      <description>reboot your server,</description>
      <pubDate>Thu, 12 Mar 2009 10:48:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377400#M348114</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-03-12T10:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377401#M348115</link>
      <description>i had rebooted server when i got this issue before couple of month, i tried few way to kill it but failed.&lt;BR /&gt;&lt;BR /&gt;you may try to reboot your server.</description>
      <pubDate>Thu, 12 Mar 2009 12:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377401#M348115</guid>
      <dc:creator>avizen9</dc:creator>
      <dc:date>2009-03-12T12:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377402#M348116</link>
      <description>Is any procedure to kill it without reboot without affecting login users.</description>
      <pubDate>Fri, 13 Mar 2009 03:12:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377402#M348116</guid>
      <dc:creator>udayraj kotian</dc:creator>
      <dc:date>2009-03-13T03:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377403#M348117</link>
      <description>&amp;gt;Is any procedure to kill it without reboot without affecting login users.&lt;BR /&gt;&lt;BR /&gt;You will manually have to edit the /etc/utmp and /etc/utmpx files.&lt;BR /&gt;You may have to stop utmpd(1M) if on 11.23.&lt;BR /&gt;You can use fwtmp(1M) to format the /etc/utmp file but after you restart utmpd, it says it reads utmps.  So you'll have to write a program like fwtmp to work on utmps(4) formats.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;MK: But if the session is ended with "kill -9", this process may be disrupted and the incorrect session information may remain&lt;BR /&gt;&lt;BR /&gt;This is a broken design and basically says this info isn't important.  There should be a system demon that makes sure this works correctly.  That's probably why there is now utmpd(1M).</description>
      <pubDate>Fri, 13 Mar 2009 04:51:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377403#M348117</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-13T04:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377404#M348118</link>
      <description>&lt;!--!*#--&gt;Dennis Handly wrote&lt;BR /&gt;&amp;gt; You can use fwtmp(1M) to format the /etc/utmp file but after you restart utmpd, it says it reads utmps. So you'll have to write a program like fwtmp to work on utmps(4) formats.&lt;BR /&gt;...&lt;BR /&gt;&amp;gt; This is a broken design and basically says this info isn't important. There should be a system demon that makes sure this works correctly. That's probably why there is now utmpd(1M).&lt;BR /&gt;&lt;BR /&gt;As far as I can tell from 2 days of investigation you are absolutely right on both accounts.&lt;BR /&gt;Reality as of 11v3 aka B.11.31 seems to be like this:&lt;BR /&gt;- there are utmpd + bunch of files&lt;BR /&gt;  - /etc/utmp: good old legacy utmp&lt;BR /&gt;  - /var/adm/wtmps: utmp log, updated (by utmpd?) too&lt;BR /&gt;  - /var/adm/btmps: btmp log, updated (by utmpd?) too&lt;BR /&gt;  - /etc/utmpx: newest utmp, reads deprecated (only if utmpd is not running); updated by utmpd&lt;BR /&gt;  - /etc/utmps: utmpd saves state here on exit&lt;BR /&gt;  - plus in-memory utmpd database, which is currently Right Way to access&lt;BR /&gt;- different programs use different DBs&lt;BR /&gt;  - who uses utmpd, but 'who /etc/utmp' is ok too&lt;BR /&gt;  - last/lastb use wtmps/btmps, last -f use /var/awm/wtmp&lt;BR /&gt;- utmpd is good but not fully reliable solution&lt;BR /&gt;  - if shell is killed with -9, its tty record is forever in utmpd database&lt;BR /&gt;  - restarting utmpd (whith /sbin/init.d/utmpd stop/start) does not help -- all is saved&lt;BR /&gt;    in utmps and read back&lt;BR /&gt;  - it would be good if HP added periodic check for dead PIDs of process leaders or at least&lt;BR /&gt;    some cleanup at restart&lt;BR /&gt;- current crop of tools are unable to fix utmpd-related things&lt;BR /&gt;  - fwtmp -X &amp;lt; /var/adm/wtmps is ok, fwtmp &amp;lt; /etc/utmp is ok too, but utmps and utmpx are&lt;BR /&gt;    not accessible with fwtmp (different format)&lt;BR /&gt;    - ./fwtmp &amp;lt; /etc/utmpx seems to work but resuls are total and obvious crap&lt;BR /&gt;  - so there is no way to get rid of stale entries in utmpd DB except reload&lt;BR /&gt;    - or maybe stopping utmpd and 'echo &amp;gt; /etc/utmps' before start, loosing current logins&lt;BR /&gt;&lt;BR /&gt;I wrote 2 small tools to fix utmpd DB without  reboot. Maybe they'll be userful to someone.&lt;BR /&gt;&lt;BR /&gt;  - read_utmps.c&lt;BR /&gt;    #include &lt;STDIO.H&gt;&lt;BR /&gt;    #include &lt;UTMPS.H&gt;&lt;BR /&gt;&lt;BR /&gt;    int main()&lt;BR /&gt;    {&lt;BR /&gt;      // see /usr/include/utmps.h&lt;BR /&gt;      struct utmps *wtmps;&lt;BR /&gt;&lt;BR /&gt;      // read in-memory utmpd DB&lt;BR /&gt;      while ((wtmps = getutsent(sizeof(struct utmps))) != NULL) {&lt;BR /&gt;        printf("%-16.16s %-8.8s %-12.12s %5ld %2hd %lu %s\n",&lt;BR /&gt;          wtmps-&amp;gt;ut_id,            // unique ID&lt;BR /&gt;          wtmps-&amp;gt;ut_user,&lt;BR /&gt;          wtmps-&amp;gt;ut_line,&lt;BR /&gt;          wtmps-&amp;gt;ut_pid,&lt;BR /&gt;          wtmps-&amp;gt;ut_type,          // 7 USER_PROCESS, 8 DEAD_PROCESS&lt;BR /&gt;          wtmps-&amp;gt;ut_tv.tv_sec,&lt;BR /&gt;          wtmps-&amp;gt;ut_host&lt;BR /&gt;        );&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;  - write_utmps.c&lt;BR /&gt;    #include &lt;STDIO.H&gt;&lt;BR /&gt;    #include &lt;UTMPS.H&gt;&lt;BR /&gt;&lt;BR /&gt;    int main(int argc, char **argv)&lt;BR /&gt;    {&lt;BR /&gt;      // see /usr/include/utmps.h&lt;BR /&gt;      struct utmps *wtmps;&lt;BR /&gt;&lt;BR /&gt;      if (! argv[1]) {&lt;BR /&gt;        fprintf(stderr, "ERROR: pleas give ut_id of stale session as argument\n\n");&lt;BR /&gt;        fprintf(stderr, "procedure is usually as follows:\n");&lt;BR /&gt;        fprintf(stderr, "- find dead sessions like 'who -u | grep old'\n");&lt;BR /&gt;        fprintf(stderr, "  - ensure they're really dead with 'ps -xp &lt;PID&gt;'\n");&lt;BR /&gt;        fprintf(stderr, "- find ut_id with read_utmps\n");&lt;BR /&gt;        fprintf(stderr, "  - 1st field, usually == &lt;TTYNO&gt; or &lt;TTYNO&gt;pts/&lt;TTYNO&gt;\n");&lt;BR /&gt;        fprintf(stderr, "- end session with write_utmps &lt;UT_ID&gt;\n");&lt;BR /&gt;        fprintf(stderr, "  - requires root privs\n");&lt;BR /&gt;        return(1);&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;      // read in-memory utmpd DB&lt;BR /&gt;      while ((wtmps = getutsent(sizeof(struct utmps))) != NULL) {&lt;BR /&gt;        if (strcmp(wtmps-&amp;gt;ut_id, argv[1]) == 0) {&lt;BR /&gt;          printf("bingo, %s found\n", argv[1]);&lt;BR /&gt;          printf("%-15.15s %-8.8s %-12.12s %5ld %2hd %lu %s\n",&lt;BR /&gt;            wtmps-&amp;gt;ut_id,            // unique ID&lt;BR /&gt;            wtmps-&amp;gt;ut_user,&lt;BR /&gt;            wtmps-&amp;gt;ut_line,&lt;BR /&gt;            wtmps-&amp;gt;ut_pid,&lt;BR /&gt;            wtmps-&amp;gt;ut_type,          // 7 USER_PROCESS, 8 DEAD_PROCESS&lt;BR /&gt;            wtmps-&amp;gt;ut_tv.tv_sec,&lt;BR /&gt;            wtmps-&amp;gt;ut_host&lt;BR /&gt;          );&lt;BR /&gt;          // mark it as DEAD to end session&lt;BR /&gt;          if (wtmps-&amp;gt;ut_type == USER_PROCESS) {&lt;BR /&gt;            wtmps-&amp;gt;ut_type = DEAD_PROCESS;&lt;BR /&gt;            time(&amp;amp;wtmps-&amp;gt;ut_tv.tv_sec);&lt;BR /&gt;            pututsline(wtmps, sizeof(struct utmps));&lt;BR /&gt;          }&lt;BR /&gt;        }&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;&lt;/UT_ID&gt;&lt;/TTYNO&gt;&lt;/TTYNO&gt;&lt;/TTYNO&gt;&lt;/PID&gt;&lt;/UTMPS.H&gt;&lt;/STDIO.H&gt;&lt;/UTMPS.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 06 Aug 2009 08:02:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377404#M348118</guid>
      <dc:creator>Alexey Vekshin</dc:creator>
      <dc:date>2009-08-06T08:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377405#M348119</link>
      <description>&lt;!--!*#--&gt;&amp;gt;Alexey: from 2 days of investigation&lt;BR /&gt;&lt;BR /&gt;I may have spent that long on it, over several questions.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;if (!argv[1]) {&lt;BR /&gt;&lt;BR /&gt;You might want to do the more obvious test:&lt;BR /&gt;if (argc &amp;lt; 2) {&lt;BR /&gt;&lt;BR /&gt;fprintf(stderr, "ERROR: please give ut_id of stale session as argument\n\n");&lt;BR /&gt;&lt;BR /&gt;You can combine all of these fprintf into one so you don't make libc sweat:&lt;BR /&gt;fprintf(stderr, "ERROR: please give ut_id of stale session as argument\n\n"&lt;BR /&gt;        "procedure is usually as follows:\n"&lt;BR /&gt;        "  - ensure they're really dead with 'ps -xp &lt;PID&gt;'\n"&lt;BR /&gt;        "- find ut_id with read_utmps\n"&lt;BR /&gt;        "  - 1st field, usually == &lt;TTYNO&gt; or &lt;TTYNO&gt;pts/&lt;TTYNO&gt;\n"&lt;BR /&gt;        "- end session with write_utmps &lt;UT_ID&gt;\n"&lt;BR /&gt;        "  - requires root privs\n");&lt;/UT_ID&gt;&lt;/TTYNO&gt;&lt;/TTYNO&gt;&lt;/TTYNO&gt;&lt;/PID&gt;</description>
      <pubDate>Thu, 06 Aug 2009 08:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377405#M348119</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-08-06T08:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377406#M348120</link>
      <description>Dennis Handly wrote&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &amp;gt;if (!argv[1]) {&lt;BR /&gt;&amp;gt; You might want to do the more obvious test: if (argc &amp;lt; 2) {&lt;BR /&gt;&lt;BR /&gt;I rarely write C -- only then there is no ready-made perl module for a task :)&lt;BR /&gt;&lt;BR /&gt;Style aside, there is definitely room for improvement in write_utmps -- &lt;BR /&gt;iterating whole DB is unnesessary because getutsid/getutsline allows us to&lt;BR /&gt;fetch session record by ID. Those 2 utils are quick hacks not intended for &lt;BR /&gt;continuous industrial use but to fill the void and maybe spare someone a  &lt;BR /&gt;reboot or two.&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Aug 2009 06:16:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377406#M348120</guid>
      <dc:creator>Alexey Vekshin</dc:creator>
      <dc:date>2009-08-11T06:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: user id processes not get killed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377407#M348121</link>
      <description>Thanks for the C template! This allowed us to mark "DEAD" a corrupted entry in utmpx that was causing issues in our application, simply replacing the header with utmpx.h and replacing utmps functions with utmpx functions.</description>
      <pubDate>Wed, 10 Mar 2010 17:00:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-id-processes-not-get-killed/m-p/4377407#M348121</guid>
      <dc:creator>R Bray</dc:creator>
      <dc:date>2010-03-10T17:00:15Z</dc:date>
    </item>
  </channel>
</rss>

