Change 8452

sven_erik_knop (Sven Erik Knop)
Sven Erik Knop committed this change into //guest/sven_erik_knop/P4Pythonlib/scripts
Request Review
Download .zip
CountUsers, a simple script that allows me to count all unique users on a range
of servers. Useful if you have an enterprise wide license and want to ensure
compliance.

Needs a config file with the servers, the user to log on with and a password.
Format:

# P4PORT, P4USER, P4PASSWD
localhost:1666, countUsers, userpass
ssl:localhost:20101, countUsers, userpass
localhost:1667, countUsers, userpass

Usage help:

usage: CountUsers.py [-h] [-c CONFIG] [-v]

CountUsers

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Default is countUsers.cfg
  -v, --verbose         Provide output on stdout

Copyright (C) 2013 Sven Erik Knop, Perforce Software Ltd

With the -v option enabled, prints out the (sorted) list of unique users as well as the
total count.
  • Files 1
  • Comments 0
0 edited 1 added 0 deleted
CountUsers.py#1
Loading...
Tip: Use n and p to cycle through the changes.