[OpenAFS] Find windows openafs version

Steve Simmons scs@umich.edu
Fri, 23 Aug 2013 12:16:14 -0400

On Aug 22, 2013, at 10:39 AM, Christof Hanke <hanke@rzg.mpg.de> wrote:

> Hi,
> Am 22.08.2013, 16:33 Uhr, schrieb G=E9mes G=E9za <geza@kzsdabas.hu>:
>> Sorry for this slightly off topic question, but what is the =
recommended way to find out the version of the openafs installation.
>> I ask this because I wrote different installation scripts (which take =
into account if the installation is 32 or 64 bit), (using wpkg to deploy =
them), but the problem is always the same: Is the installed version the =
newest, or it needs to be upgraded?
> not sure if it is recommended,
> but executing "rxdebug localhost 7001 -v"
> should give you what you need.

At one point we did semi-annual audits of all AFS clients hitting our =
hosts. Another fellow here wrote some scripts to help with it; I'll =
check with him to see what state they're in and if they're releasable. I =
did one myself but it was a one-off; as I recall the hard part was =
writing the funky regex/filter that read logfiles and removed everything =
that didn't look like an IP address.=20

The audit process involved taking the last few months of the fileserver =
logs from each server (FileLog) and filtering out anything that doesn't =
look like an IP address; then running them through 'sort | uniq -c > =
clientlist'. That gave us a file with a frequency use of each address, =

I wrote a tiny little bash script 'getversions' that generated the =
version numbers on stdout and the failed probes on stderr. The result =
files are in a form that lets you feed them back into the script as =
you'll see below. Be patient when you do this sort of run; for every =
host that doesn't respond expect a 30-second delay. Note also that this =
isn't perfect - NAT boxes and changing addresses across wireless =
connections will fool you. But for our purpose, it's good enough.

Edited sample run and rerun, including data and script. Addresses =
changed to protect the guilty:

  scs$ more getversions
  while read COUNT ADDR DUMMY ; do
      ARRAY=3D($(echo $(rxdebug $ADDR 7001 -v 2>&1)))
      if [[ "AFS" =3D=3D "${ARRAY[4]}" ]] ; then
          echo $COUNT $ADDR ${ARRAY[6]} ${ARRAY[7]} ${ARRAY[8]} =
          echo $COUNT $ADDR "'${ARRAY[*]}'" >&2
  scs$ ./getversions < clientlist > clients.identified 2> =
  scs$ more client*
  1 OpenAFS 1.4.11 built 2009-08-18
  3 OpenAFS 1.4.15 built 2013-07-31
  2 'Trying (port 7001): get version call =
failed with
  code -1, errno 0'
  scs$ ./getversions < clients.unidentified >> clients.identified
  2 'Trying (port 7001): get version call =
failed with code -1, errno 0'