Nik
Jul 18, 2011Cirrus
automate command-line statistics
i'm looking to create a script that will run daily and print a list of virtual servers and nodes that have zero activity since the last reset followed by a reset. this will be sent out via email. the best tool i've found so far is bigtop, this is what i've come up with:
bigtop -once -vname|grep '[0]\ \+[0]\ \+[0]\ \+[0]\ \+[0]\ \+'
long.name.of.virtual. 0 0 0 0 0 0 0
long.name.of.node.com 0 0 0 0 0 0 DOWN
i have a few concerns though:
1) bigtop cuts off the virtual/node name after 21 characters. any idea how to get the whole thing? this is pretty important to me since we have lots of long hostnames.
2) what's the lowest level of access i can run a global statistic reset with? this is to be automatically run remotely so i'd like the user to have as little access as possible.
3) is there a better way to do this other than cutting up the output of bigtop?
thanks!