source: trunk/misc/operations_helpers/munin/tahoe_helperstats_active

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: 559 bytes
Line 
1#!/usr/bin/env python
2
3
4import os, sys
5import urllib
6import json
7
8configinfo = """\
9graph_title Tahoe Helper Stats - Active Files
10graph_vlabel bytes
11graph_category tahoe
12graph_info This graph shows the number of files being actively processed by the helper
13fetched.label Active Files
14fetched.draw LINE2
15"""
16
17if len(sys.argv) > 1:
18    if sys.argv[1] == "config":
19        print(configinfo.rstrip())
20        sys.exit(0)
21
22url = os.environ["url"]
23
24data = json.loads(urllib.urlopen(url).read())
25print("fetched.value %d" % data["chk_upload_helper.active_uploads"])
26
Note: See TracBrowser for help on using the repository browser.