{"id":1193,"date":"2022-03-05T17:04:26","date_gmt":"2022-03-05T17:04:26","guid":{"rendered":"https:\/\/jamj.org\/?p=1193"},"modified":"2022-03-05T17:04:26","modified_gmt":"2022-03-05T17:04:26","slug":"gnu-w","status":"publish","type":"post","link":"https:\/\/jamj.org\/index.php\/2022\/03\/05\/gnu-w\/","title":{"rendered":"Gnu &#8211; w"},"content":{"rendered":"\n<p>Have you ever wonder <em>who<\/em> is in your system? and doing what? Well, beauty always comes in small packages and today it is not an exception, the only thing you need is:  <code>w<\/code> .This small tool comes to the rescue. The format is as follows: <\/p>\n\n\n\n<p><code>w [options] user [\u2026]<\/code><\/p>\n\n\n\n<p>Lets see some examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>w -&gt; this command with no parameters shows you all the info you need. This is the output (depends on your system): <\/li><\/ul>\n\n\n\n<p class=\"has-small-font-size\"><code>17:37:51 up 7:52, 1 user, load average: 0,44, 0,62, 0,69<br>USER   TTY  LOGIN@    IDLE    JCPU   PCPU   WHAT<br>user  :0    09:45    ?xdm?    1:23m  0.00s  \/usr\/libexec\/gdm-x-session --run-script \/usr\/bin\/gnome-session<\/code><\/p>\n\n\n\n<p>lets see what we have here: <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>17:37:51<\/code>  -> current time<\/li><li><code>up 7:52<\/code> -> how long the system has been running<\/li><li><code>1 user<\/code> -> how many users are currently logged on<\/li><li><code>load average: 0,44, 0,62, 0,69<\/code> -> the load average  the past 1, 5 and 15 minutes respectively<\/li><li>Then, for each user logged into the system we have one row showing:<ol><li><code>user<\/code>-> login name <\/li><li><code>:0 <\/code>-> the tty name<\/li><li><code>From<\/code> -> this field only appears if the user is connected through a remote ssh conection. In this example do not appears because the user is local <\/li><li><code>09:45<\/code> -> login time<\/li><li><code>?xdm?<\/code> -> idle time (usually for remote users, if the user is local, shows <em>xdm<\/em>, the display manager)<\/li><li>JCPU  -> is the time used by all processes attached to the tty<\/li><li>PCPU -> is the time used by the current process (the one in the<em> what <\/em>field)<\/li><li><code>\/usr\/libexec<\/code>&#8230; -> command line of the current process<\/li><\/ol><\/li><\/ol>\n\n\n\n<p>That is a lot of info for just <em>w <\/em>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wonder who is in your system? and doing what? Well, beauty always comes in small packages and today it is not an exception, the only thing you need is: w .This small tool comes to the rescue. The format is as follows: w [options] user [\u2026] Lets see some examples: w -&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1193","post","type-post","status-publish","format-standard","hentry","category-gnu"],"_links":{"self":[{"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/posts\/1193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/comments?post=1193"}],"version-history":[{"count":0,"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/posts\/1193\/revisions"}],"wp:attachment":[{"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/media?parent=1193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/categories?post=1193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jamj.org\/index.php\/wp-json\/wp\/v2\/tags?post=1193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}