<?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: logout information in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556474#M28816</link>
    <description>Hi Jeganathan&lt;BR /&gt;When ever someone logs in you will have a entry created in wtmp file so for example I login today and I am not loged out my entry looks like this&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:32   still logged in&lt;BR /&gt;Then I log-out my entry looks like this&lt;BR /&gt;#{sachin}% last | grep Jul | grep 24&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:32 - 13:34  (00:01)&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:30 - 13:30  (00:00)&lt;BR /&gt;So That means I login and out two time today in this system. &lt;BR /&gt;#last |grep &lt;BR /&gt;I have test this in my system as I type.&lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 24 Jul 2001 17:35:39 GMT</pubDate>
    <dc:creator>Sachin Patel</dc:creator>
    <dc:date>2001-07-24T17:35:39Z</dc:date>
    <item>
      <title>logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556468#M28810</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is there any way to find list of users "log-out" on any given day?&lt;BR /&gt;&lt;BR /&gt;It is easy to find list of users "log-in" on any given day by using 'last' command.&lt;BR /&gt;&lt;BR /&gt;But logout details....?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jegi,&lt;BR /&gt;NBC</description>
      <pubDate>Tue, 24 Jul 2001 16:14:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556468#M28810</guid>
      <dc:creator>Jeganathan Venkitasamy</dc:creator>
      <dc:date>2001-07-24T16:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556469#M28811</link>
      <description>Hi&lt;BR /&gt;You can compare who and last's output and find out who log-out.&lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 16:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556469#M28811</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-07-24T16:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556470#M28812</link>
      <description>Last command will show you both logged in and loggout details(user-id, terminal, m/c name /ip address Day Month,date,loggedin time, logged out time, total logged in time). See the below out put of last command.&lt;BR /&gt;user1   pts/1        128.1.20.25 Fri Jul 20 10:55 - 17:13  (06:18)&lt;BR /&gt;user1   pts/1        128.1.20.25 Fri Jul 20 10:52 - 10:55  (00:02)&lt;BR /&gt;user1   pts/1        128.1.20.25 Fri Jul 20 10:02 - 10:27  (00:25)&lt;BR /&gt;user1   pts/1        128.1.20.25 Fri Jul 20 08:58 - 09:01  (00:02)&lt;BR /&gt;user1   pts/1        128.1.20.25 Mon Jul 16 08:20 - 17:49  (09:29)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 16:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556470#M28812</guid>
      <dc:creator>George_14</dc:creator>
      <dc:date>2001-07-24T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556471#M28813</link>
      <description>Okay friends,&lt;BR /&gt;&lt;BR /&gt;I think I need to refine my question.&lt;BR /&gt;&lt;BR /&gt;To find logins on say July 12th, I need to run&lt;BR /&gt;&lt;BR /&gt;# last|grep "Jul 12"&lt;BR /&gt;( this command may need to be fine tuned to get correct result )&lt;BR /&gt;&lt;BR /&gt;The output will show list of logins on July 12th. This is how we can find "list of users logged in on any given day".&lt;BR /&gt;&lt;BR /&gt;My question is 'how to find list of users logged out on July 12th ?'&lt;BR /&gt;&lt;BR /&gt;Last command output has logout details but not the date of logout.&lt;BR /&gt;&lt;BR /&gt;My intention is to find "list of users or at least number of users logged out on any given day"&lt;BR /&gt;&lt;BR /&gt;I think I made my intention clear.&lt;BR /&gt;&lt;BR /&gt;Thanks guys,&lt;BR /&gt;Jegi&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 17:00:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556471#M28813</guid>
      <dc:creator>Jeganathan Venkitasamy</dc:creator>
      <dc:date>2001-07-24T17:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556472#M28814</link>
      <description>Hi Jeganathan&lt;BR /&gt;&lt;BR /&gt;try this&lt;BR /&gt;&lt;BR /&gt;last | awk ' { if ( $4=="Jul" &amp;amp;&amp;amp; $5=="6") print $NF,$4,$5,$6,$7,$8 } ' &amp;gt; filename&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 17:06:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556472#M28814</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-07-24T17:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556473#M28815</link>
      <description>Hi manoj,&lt;BR /&gt;&lt;BR /&gt;Thanks for your response. Anyhow, your command will give me details of logins and logout if the user logout on same day( in our case July 12th). But what if the user logged in at 11:00PM on July 11th and logout on July 12th 4:00AM. If the user name is 'test', then this login session record will show in last command as&lt;BR /&gt;&lt;BR /&gt;"test pts/0 3.3.15.90 Wed Jul 11 23:00 - 04:00 (05:00)"&lt;BR /&gt;&lt;BR /&gt;Though this test user logged out on July 12th, last command doesn't keep date stamp for logout.&lt;BR /&gt;I wonder is there any command or method to find logout date.&lt;BR /&gt;&lt;BR /&gt;We have a system with approximately 1000 users and a typical users login session may range from 10 minutes to 10 days. We are conducting a study of system utilization over a range of past 6 months. That's how I got this weird requirement of "finding list of users logged out on any given day"!&lt;BR /&gt;&lt;BR /&gt;Eagerly waiting for some clue.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Jegi</description>
      <pubDate>Tue, 24 Jul 2001 17:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556473#M28815</guid>
      <dc:creator>Jeganathan Venkitasamy</dc:creator>
      <dc:date>2001-07-24T17:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556474#M28816</link>
      <description>Hi Jeganathan&lt;BR /&gt;When ever someone logs in you will have a entry created in wtmp file so for example I login today and I am not loged out my entry looks like this&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:32   still logged in&lt;BR /&gt;Then I log-out my entry looks like this&lt;BR /&gt;#{sachin}% last | grep Jul | grep 24&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:32 - 13:34  (00:01)&lt;BR /&gt;sachin   ttyp1        Tue Jul 24 13:30 - 13:30  (00:00)&lt;BR /&gt;So That means I login and out two time today in this system. &lt;BR /&gt;#last |grep &lt;BR /&gt;I have test this in my system as I type.&lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 17:35:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556474#M28816</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-07-24T17:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556475#M28817</link>
      <description>Hi Jegi,&lt;BR /&gt;&lt;BR /&gt;You might use "who -a /var/adm/wtmp" and grep or awk the stuff you need.  Here's sample entry lines for the login and logout of a session:&lt;BR /&gt;&lt;BR /&gt;userx pts/trc Jul 24 14:35  0:01 27783 sysA&lt;BR /&gt;&lt;BR /&gt;userx pts/trc Jul 24 14:37  0:01 27783 id= trc term=0   exit=0&lt;BR /&gt;&lt;BR /&gt;Use the loginid and tty fields to match the logout with the login.  Good luck,&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 24 Jul 2001 17:52:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556475#M28817</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-07-24T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556476#M28818</link>
      <description>Hi Jegi,&lt;BR /&gt;&lt;BR /&gt;The output of 'last' contains the date and time of each login, and also, the length of the login session in hours and minutes.  Now you could write a small program that takes the time and date of the login, adds the number of hours and minutes of the session, and calculates the date for the moment the session was ended.&lt;BR /&gt;&lt;BR /&gt;I have seen some related questions on this forum where people wanted to know how to calculate the date so many days before or after today.  If you think you could make use of this, try search for "calculate date" on the Forum.  (You will likely find a lot of good suggestions.)&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Mladen</description>
      <pubDate>Tue, 24 Jul 2001 18:11:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556476#M28818</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-07-24T18:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: logout information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556477#M28819</link>
      <description>Thanks a lot friends!&lt;BR /&gt;&lt;BR /&gt;Darrell's solution is smart. The only thing I need to do to find logouts on say July 12th is&lt;BR /&gt;&lt;BR /&gt;#who -a /var/adm/wtmp|grep "Jul 12"|grep "exit=0"&lt;BR /&gt;&lt;BR /&gt;It really works!&lt;BR /&gt;&lt;BR /&gt;Mladen's approach will also lead me to get desired result. I thought of it already.But that calls for a real complicated scripting.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot friends.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Jegi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2001 18:29:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/logout-information/m-p/2556477#M28819</guid>
      <dc:creator>Jeganathan Venkitasamy</dc:creator>
      <dc:date>2001-07-24T18:29:11Z</dc:date>
    </item>
  </channel>
</rss>

