Tracker

From FarmShare

(Difference between revisions)
Jump to: navigation, search
 
Line 23: Line 23:
Here's a way to make the tracker log more readable:
Here's a way to make the tracker log more readable:
   cat tracker/current | tai64nlocal | grep sas | perl -MRegexp::Common -pe 's/($RE{net}{IPv4})/`dig +short -x $1 | cut -f 1 -d '.' | tr "\n" " " `/ge'
   cat tracker/current | tai64nlocal | grep sas | perl -MRegexp::Common -pe 's/($RE{net}{IPv4})/`dig +short -x $1 | cut -f 1 -d '.' | tr "\n" " " `/ge'
 +
 +
 +
==2016-05-12==
 +
Compiled trackerd on license4, wrote a new systemd unit file and started it up, so it listens on udp port 1738 on license4.stanford.edu and logs to syslog
 +
 +
<pre>
 +
[root@license4 ~]# cat /etc/firewalld/services/trackerd.xml
 +
<?xml version="1.0" encoding="utf-8"?>
 +
  <service>
 +
    <short>trackerd</short>
 +
    <description>trackerd</description>
 +
    <port port="1738" protocol="udp"/>
 +
</service>
 +
[root@license4 ~]# cat /lib/systemd/system/trackerd.service
 +
[Unit]
 +
Description=Start trackerd at startup and log its stdout
 +
After=multi-user.target
 +
[Service]
 +
Type=simple
 +
ExecStart=/usr/local/bin/trackerd
 +
StandardOutput=journal
 +
[Install]
 +
WantedBy=multi-user.target
 +
</pre>
 +
 +
Changed DNS entry for track.stanford.edu from license3 to license4.

Latest revision as of 13:31, 12 May 2016

We use 'tracker', a Stanford-specific software, to track how many users use which software: http://www.eyrie.org/~eagle/software/tracker/

Its default destination is hostname 'track'.

using tracker

Example, when I installed Stat/Transfer 11:

  cd /farmshare/software/non-free/stattransfer11_64/
  mv st .t%st
  mv stattransfer .t%stattransfer
  cp -ip /farmshare/user_data/chekh/chekh-from-gluster/src/tracker-1.1/tracker .
  ln -s tracker st
  ln -s tracker stattransfer

Now, do a license3:/root# tail -f /var/log/tracker/current and you'll see entries show up when you run st or stattransfer:

@400000004f98536f170f2ce4 chekh@171.67.216.88 stattransfer

Jane at the Software Licensing office uses this log to track usage. We have the logs available here: https://www/services/pubsw/tracker-stats/

Here's a way to make the tracker log more readable:

 cat tracker/current | tai64nlocal | grep sas | perl -MRegexp::Common -pe 's/($RE{net}{IPv4})/`dig +short -x $1 | cut -f 1 -d '.' | tr "\n" " " `/ge'


2016-05-12

Compiled trackerd on license4, wrote a new systemd unit file and started it up, so it listens on udp port 1738 on license4.stanford.edu and logs to syslog

[root@license4 ~]# cat /etc/firewalld/services/trackerd.xml 
<?xml version="1.0" encoding="utf-8"?>
  <service>
    <short>trackerd</short>
    <description>trackerd</description>
    <port port="1738" protocol="udp"/>
</service>
[root@license4 ~]# cat /lib/systemd/system/trackerd.service 
[Unit]
Description=Start trackerd at startup and log its stdout
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/local/bin/trackerd
StandardOutput=journal
[Install]
WantedBy=multi-user.target 

Changed DNS entry for track.stanford.edu from license3 to license4.

Personal tools
Toolbox
LANGUAGES