source: trunk/misc/operations_helpers/munin/tahoe_rootdir_space

Last change on this file was b856238, checked in by Alexandre Detiste <alexandre.detiste@…>, at 2024-02-15T15:53:34Z

remove old Python2 future statements

  • Property mode set to 100644
File size: 506 bytes
Line 
1#!/usr/bin/env python
2
3
4import os, sys
5import urllib
6
7configinfo = """\
8graph_title Tahoe Root Directory Size
9graph_vlabel bytes
10graph_category tahoe
11graph_info This graph shows the amount of space consumed by all files reachable from a given directory
12space.label Space
13space.draw LINE2
14"""
15
16if len(sys.argv) > 1:
17    if sys.argv[1] == "config":
18        print(configinfo.rstrip())
19        sys.exit(0)
20
21url = os.environ["url"]
22
23data = int(urllib.urlopen(url).read().strip())
24print("space.value %d" % data)
Note: See TracBrowser for help on using the repository browser.