* [PATCH v2 00/10] Cover Letter
@ 2023-06-01 20:27 Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py Anubhav Shelat
` (9 more replies)
0 siblings, 10 replies; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Patch 9 fixes an issue where the device has IPv6 disabled, causing a FileNotFound error.
All other patches edit files to replace standard strings with f-strings.
Anubhav Shelat (10):
rteval: Use f-strings in rtevalclient.py
rteval: Use f-strings in rtevalConfig
rteval: Use f-strings in cputopology
rteval: Use f-strings in kernel.py
rteval: Use f-strings in memory.py
rteval: Use f-strings in osinfo
rteval: Use f-strings in services.py
rteval: Use f-strings in tools.py
Added code to check if the proc/net/if_inet6 file exists while loading
IPv6 addresses in the IPv6Addresses class
rteval: Use f-strings in __init__.py
rteval/rtevalConfig.py | 2 +-
rteval/rtevalclient.py | 2 +-
rteval/sysinfo/__init__.py | 18 +++++++-----------
rteval/sysinfo/cputopology.py | 4 +---
rteval/sysinfo/kernel.py | 4 ++--
rteval/sysinfo/memory.py | 8 ++++----
rteval/sysinfo/newnet.py | 28 ++++++++++++++++------------
rteval/sysinfo/osinfo.py | 12 ++++++------
rteval/sysinfo/services.py | 12 ++++++------
rteval/sysinfo/tools.py | 2 +-
10 files changed, 45 insertions(+), 47 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-05 19:28 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig Anubhav Shelat
` (8 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in rtevalclient.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/rtevalclient.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/rtevalclient.py b/rteval/rtevalclient.py
index 26c953005326..7ff7d2700cfc 100644
--- a/rteval/rtevalclient.py
+++ b/rteval/rtevalclient.py
@@ -61,7 +61,7 @@ class rtevalclient:
cmpr = compr.compress(fbuf.getvalue())
data = base64.b64encode(cmpr + compr.flush())
ret = self.srv.SendReport(self.hostname, data)
- print("rtevalclient::SendReport() - Sent %i bytes (XML document length: %i bytes, compression ratio: %.02f%%)" % (len(data), doclen, (1-(float(len(data)) / float(doclen)))*100 ))
+ print(f"rtevalclient::SendReport() - Sent {len(data)} bytes (XML document length: {doclen} bytes, compression ratio: {(1-(float(len(data)) / float(doclen)))*100}:.2f)")
return ret
def SendDataAsFile(self, fname, data, decompr = False):
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-05 19:31 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 03/10] rteval: Use f-strings in cputopology Anubhav Shelat
` (7 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in rtevalConfig.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/rtevalConfig.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py
index de88924642ca..41f1a567720f 100644
--- a/rteval/rtevalConfig.py
+++ b/rteval/rtevalConfig.py
@@ -115,7 +115,7 @@ class rtevalCfgSection:
"Simple method for dumping config when object is used as a string"
if not self.__cfgdata:
return "# empty"
- return "\n".join(["%s: %s" % (k, v) for k, v in list(self.__cfgdata.items())]) + "\n"
+ return "\n".join([f"{k}: {v}" for k, v in list(self.__cfgdata.items())]) + "\n"
def __setattr__(self, key, val):
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 03/10] rteval: Use f-strings in cputopology
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:32 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 04/10] rteval: Use f-strings in kernel.py Anubhav Shelat
` (6 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in cputopology
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/cputopology.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/rteval/sysinfo/cputopology.py b/rteval/sysinfo/cputopology.py
index ced7e1f295b7..2bb632312320 100644
--- a/rteval/sysinfo/cputopology.py
+++ b/rteval/sysinfo/cputopology.py
@@ -124,9 +124,7 @@ def unit_test(rootdir):
x.saveFormatFileEnc('-', 'UTF-8', 1)
print(" ---- getCPUcores() / getCPUscokets() ---- ")
- print("CPU cores: %i (online: %i) - CPU sockets: %i" % (cputop.cpu_getCores(False),
- cputop.cpu_getCores(True),
- cputop.cpu_getSockets()))
+ print(f"CPU cores: {cputop.cpu_getCores(False)} (online: {cputop.cpu_getCores(True)}) - CPU sockets: {cputop.cpu_getSockets()}")
return 0
except Exception as e:
# import traceback
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 04/10] rteval: Use f-strings in kernel.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (2 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 03/10] rteval: Use f-strings in cputopology Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:35 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 05/10] rteval: Use f-strings in memory.py Anubhav Shelat
` (5 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in kernel.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/kernel.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rteval/sysinfo/kernel.py b/rteval/sysinfo/kernel.py
index f2e9d72ac2ef..ba5cadda40c5 100644
--- a/rteval/sysinfo/kernel.py
+++ b/rteval/sysinfo/kernel.py
@@ -47,8 +47,8 @@ class KernelInfo:
policies = {'DLN': 'deadline', 'FF':'fifo', 'RR':'rrobin', 'TS':'other', '?':'unknown'}
ret_kthreads = {}
self.__log(Log.DEBUG, "getting kthread status")
- cmd = '%s -eocommand,pid,policy,rtprio,comm' % getcmdpath('ps')
- self.__log(Log.DEBUG, "cmd: %s" % cmd)
+ cmd = f"{getcmdpath('ps')} -eocommand,pid,policy,rtprio,comm"
+ self.__log(Log.DEBUG, f"cmd: {cmd}")
c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
for p in c.stdout:
v = p.strip().split()
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 05/10] rteval: Use f-strings in memory.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (3 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 04/10] rteval: Use f-strings in kernel.py Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:39 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 06/10] rteval: Use f-strings in osinfo Anubhav Shelat
` (4 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in memory.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/memory.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rteval/sysinfo/memory.py b/rteval/sysinfo/memory.py
index 7c5fd6f315cf..cc2fa2cfa4be 100644
--- a/rteval/sysinfo/memory.py
+++ b/rteval/sysinfo/memory.py
@@ -49,7 +49,7 @@ class MemoryInfo:
if l.startswith('MemTotal:'):
parts = l.split()
if parts[2].lower() != 'kb':
- raise RuntimeError("Units changed from kB! (%s)" % parts[2])
+ raise RuntimeError(f"Units changed from kB! ({parts[2]})")
rawsize = int(parts[1])
f.close()
break
@@ -76,7 +76,7 @@ class MemoryInfo:
memsize = self.mem_get_size()
mem_n = libxml2.newNode("memory_size")
- mem_n.addContent("%.3f" % memsize[0])
+ mem_n.addContent(f"{memsize[0]:.3f}")
mem_n.newProp("unit", memsize[1])
rep_n.addChild(mem_n)
@@ -88,8 +88,8 @@ def unit_test(rootdir):
import sys
try:
mi = MemoryInfo()
- print("Numa nodes: %i" % mi.mem_get_numa_nodes())
- print("Memory: %i %s" % mi.mem_get_size())
+ print(f"Numa nodes: {mi.mem_get_numa_nodes()}")
+ print(f"Memory: {int(mi.mem_get_size()[0])} {mi.mem_get_size()[1]}")
except Exception as e:
import traceback
traceback.print_exc(file=sys.stdout)
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 06/10] rteval: Use f-strings in osinfo
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (4 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 05/10] rteval: Use f-strings in memory.py Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:50 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 07/10] rteval: Use f-strings in services.py Anubhav Shelat
` (3 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in osinfo.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/osinfo.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py
index ead5e3939cfa..83dc78b96fdd 100644
--- a/rteval/sysinfo/osinfo.py
+++ b/rteval/sysinfo/osinfo.py
@@ -55,9 +55,9 @@ class OSInfo:
shutil.copyfile(dpath, os.path.join(repdir, "dmesg"))
return
if os.path.exists('/usr/bin/dmesg'):
- subprocess.call('/usr/bin/dmesg > %s' % os.path.join(repdir, "dmesg"), shell=True)
+ subprocess.call(f'/usr/bin/dmesg > {os.path.join(repdir, "dmesg")}', shell=True)
return
- print("dmesg file not found at %s and no dmesg exe found!" % dpath)
+ print(f"dmesg file not found at {dpath} and no dmesg exe found!")
@@ -69,16 +69,16 @@ class OSInfo:
else:
raise RuntimeError("Can't find sosreport/sysreport")
- self.__logger.log(Log.DEBUG, "report tool: %s" % exe)
+ self.__logger.log(Log.DEBUG, f"report tool: {exe}")
options = ['-k', 'rpm.rpmva=off',
'--name=rteval',
'--batch']
self.__logger.log(Log.INFO, "Generating SOS report")
- self.__logger.log(Log.INFO, "using command %s" % " ".join([exe]+options))
+ self.__logger.log(Log.INFO, f"using command {' '.join([exe]+options)}")
subprocess.call([exe] + options)
for s in glob('/tmp/s?sreport-rteval-*'):
- self.__logger.log(Log.DEBUG, "moving %s to %s" % (s, repdir))
+ self.__logger.log(Log.DEBUG, f"moving {s} to {repdir}")
shutil.move(s, repdir)
@@ -118,7 +118,7 @@ def unit_test(rootdir):
log = Log()
log.SetLogVerbosity(Log.DEBUG|Log.INFO)
osi = OSInfo(logger=log)
- print("Base OS: %s" % osi.get_base_os())
+ print(f"Base OS: {osi.get_base_os()}")
print("Testing OSInfo::copy_dmesg('/tmp'): ", end=' ')
osi.copy_dmesg('/tmp')
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 07/10] rteval: Use f-strings in services.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (5 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 06/10] rteval: Use f-strings in osinfo Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:58 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 08/10] rteval: Use f-strings in tools.py Anubhav Shelat
` (2 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in services.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/services.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rteval/sysinfo/services.py b/rteval/sysinfo/services.py
index c85980e19165..a87b4abeea76 100644
--- a/rteval/sysinfo/services.py
+++ b/rteval/sysinfo/services.py
@@ -55,17 +55,17 @@ class SystemServices:
break
if not servicesdir:
raise RuntimeError("No services dir (init.d) found on your system")
- self.__log(Log.DEBUG, "Services located in %s, going through each service file to check status" % servicesdir)
+ self.__log(Log.DEBUG, f"Services located in {servicesdir}, going through each service file to check status")
ret_services = {}
for service in glob.glob(os.path.join(servicesdir, '*')):
servicename = os.path.basename(service)
if not [1 for p in reject if fnmatch.fnmatch(servicename, p)] \
and os.access(service, os.X_OK):
- cmd = '%s -qs "\(^\|\W\)status)" %s' % (getcmdpath('grep'), service)
+ cmd = f'{getcmdpath("grep")} -qs "\(^\|\W\)status)" {service}'
c = subprocess.Popen(cmd, shell=True, encoding='utf-8')
c.wait()
if c.returncode == 0:
- cmd = ['env', '-i', 'LANG="%s"' % os.environ['LANG'], 'PATH="%s"' % os.environ['PATH'], 'TERM="%s"' % os.environ['TERM'], service, 'status']
+ cmd = ['env', '-i', f'LANG="{os.environ["LANG"]}"', f'PATH="{os.environ["PATH"]}"', f'TERM="{os.environ["TERM"]}"', service, 'status']
c = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
c.wait()
if c.returncode == 0 and (c.stdout.read() or c.stderr.read()):
@@ -79,8 +79,8 @@ class SystemServices:
def __get_services_systemd(self):
ret_services = {}
- cmd = '%s list-unit-files -t service --no-legend' % getcmdpath('systemctl')
- self.__log(Log.DEBUG, "cmd: %s" % cmd)
+ cmd = f'{getcmdpath("systemctl")} list-unit-files -t service --no-legend'
+ self.__log(Log.DEBUG, f"cmd: {cmd}")
c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
for p in c.stdout:
# p are lines like b'servicename.service status'
@@ -133,7 +133,7 @@ def unit_test(rootdir):
return 0
except Exception as err:
- print("** EXCEPTION: %s" % str(err))
+ print(f"** EXCEPTION: {str(err)}")
return 1
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 08/10] rteval: Use f-strings in tools.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (6 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 07/10] rteval: Use f-strings in services.py Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-12 18:59 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 10/10] rteval: Use f-strings in __init__.py Anubhav Shelat
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in tools.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/sysinfo/tools.py b/rteval/sysinfo/tools.py
index 3993da413d8a..aa00b3d3eafc 100644
--- a/rteval/sysinfo/tools.py
+++ b/rteval/sysinfo/tools.py
@@ -40,5 +40,5 @@ def getcmdpath(which):
pathSave[which] = cmdfile
break
if not pathSave[which]:
- raise RuntimeError("Command '%s' is unknown on this system" % which)
+ raise RuntimeError(f"Command '{which}' is unknown on this system")
return pathSave[which]
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (7 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 08/10] rteval: Use f-strings in tools.py Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
2023-06-06 15:22 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 10/10] rteval: Use f-strings in __init__.py Anubhav Shelat
9 siblings, 1 reply; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class. If it doesn't, then the system has IPv6 disabled, and that chunk of code is passed.
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/newnet.py | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/rteval/sysinfo/newnet.py b/rteval/sysinfo/newnet.py
index 63417d9e59f1..2911400ceb6c 100644
--- a/rteval/sysinfo/newnet.py
+++ b/rteval/sysinfo/newnet.py
@@ -72,19 +72,23 @@ class IPv6Addresses():
and a list of ipv6addresses
'''
MYP = '/proc/net/if_inet6'
- with open(MYP, 'r') as f:
- mystr = f.readline().strip()
- while len(mystr) > 0:
- ipv6addr , _, _, _, _, intf = mystr.split()
- ipv6addr = compress_iv6(ipv6addr)
- if intf == 'lo':
- mystr = f.readline().strip()
- continue
- if intf not in self.data:
- self.data[intf] = [ipv6addr]
- else:
- self.data[intf].append(ipv6addr)
+ try:
+ with open(MYP, 'r') as f:
mystr = f.readline().strip()
+ while len(mystr) > 0:
+ ipv6addr , _, _, _, _, intf = mystr.split()
+ ipv6addr = compress_iv6(ipv6addr)
+ if intf == 'lo':
+ mystr = f.readline().strip()
+ continue
+ if intf not in self.data:
+ self.data[intf] = [ipv6addr]
+ else:
+ self.data[intf].append(ipv6addr)
+ mystr = f.readline().strip()
+ # if IPv6 is disabled, the if_net6 files does not exist, so we can pass
+ except FileNotFoundError:
+ pass
class IPv4Addresses():
''' Obtains a list of IPv4 addresses from the proc file system '''
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 10/10] rteval: Use f-strings in __init__.py
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
` (8 preceding siblings ...)
2023-06-01 20:27 ` [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class Anubhav Shelat
@ 2023-06-01 20:27 ` Anubhav Shelat
9 siblings, 0 replies; 20+ messages in thread
From: Anubhav Shelat @ 2023-06-01 20:27 UTC (permalink / raw)
To: linux-rt-users; +Cc: Anubhav Shelat
Use f-strings in __init__.py
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
rteval/sysinfo/__init__.py | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/rteval/sysinfo/__init__.py b/rteval/sysinfo/__init__.py
index 5767e5b7f6fe..31059c564d59 100644
--- a/rteval/sysinfo/__init__.py
+++ b/rteval/sysinfo/__init__.py
@@ -83,27 +83,23 @@ if __name__ == "__main__":
print(f"\tRunning on {si.get_base_os()}")
print(f"\tNUMA nodes: {si.mem_get_numa_nodes()}")
- print("\tMemory available: %03.2f %s\n" % si.mem_get_size())
+ print(f"\tMemory available: {si.mem_get_size()[0]:03.2f} {si.mem_get_size()[1]}\n")
print("\tServices: ")
for (s, r) in list(si.services_get().items()):
- print("\t\t%s: %s" % (s, r))
+ print(f"\t\t{s}: {r}")
(curr, avail) = si.kernel_get_clocksources()
- print("\tCurrent clocksource: %s" % curr)
- print("\tAvailable clocksources: %s" % avail)
+ print(f"\tCurrent clocksource: {curr}")
+ print(f"\tAvailable clocksources: {avail}")
print("\tModules:")
for m in si.kernel_get_modules():
- print("\t\t%s: %s" % (m['modname'], m['modstate']))
+ print(f"\t\t{m['modname']}: {m['modstate']}")
print("\tKernel threads:")
for (p, i) in list(si.kernel_get_kthreads().items()):
- print("\t\t%-30.30s pid: %-5.5s policy: %-7.7s prio: %-3.3s" % (
- str(i["name"])+":", p, i["policy"], i["priority"]
- ))
+ print(f"\t\t{str(i['name'])[:30]+':':<30} pid: {str(p)[:5]:<5} policy: {str(i['policy'])[:7]:<7} prio: {str(i['priority'])[:3]:<3}")
- print("\n\tCPU topology info - cores: %i online: %i sockets: %i" % (
- si.cpu_getCores(False), si.cpu_getCores(True), si.cpu_getSockets()
- ))
+ print(f"\n\tCPU topology info - cores: {si.cpu_getCores(False)} online: {si.cpu_getCores(True)} sockets: {si.cpu_getSockets()}")
xml = si.MakeReport()
xml_d = libxml2.newDoc("1.0")
--
2.31.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py
2023-06-01 20:27 ` [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py Anubhav Shelat
@ 2023-06-05 19:28 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-05 19:28 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in rtevalclient.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/rtevalclient.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rteval/rtevalclient.py b/rteval/rtevalclient.py
> index 26c953005326..7ff7d2700cfc 100644
> --- a/rteval/rtevalclient.py
> +++ b/rteval/rtevalclient.py
> @@ -61,7 +61,7 @@ class rtevalclient:
> cmpr = compr.compress(fbuf.getvalue())
> data = base64.b64encode(cmpr + compr.flush())
> ret = self.srv.SendReport(self.hostname, data)
> - print("rtevalclient::SendReport() - Sent %i bytes (XML document length: %i bytes, compression ratio: %.02f%%)" % (len(data), doclen, (1-(float(len(data)) / float(doclen)))*100 ))
> + print(f"rtevalclient::SendReport() - Sent {len(data)} bytes (XML document length: {doclen} bytes, compression ratio: {(1-(float(len(data)) / float(doclen)))*100}:.2f)")
> return ret
>
> def SendDataAsFile(self, fname, data, decompr = False):
> --
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig
2023-06-01 20:27 ` [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig Anubhav Shelat
@ 2023-06-05 19:31 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-05 19:31 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in rtevalConfig.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/rtevalConfig.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py
> index de88924642ca..41f1a567720f 100644
> --- a/rteval/rtevalConfig.py
> +++ b/rteval/rtevalConfig.py
> @@ -115,7 +115,7 @@ class rtevalCfgSection:
> "Simple method for dumping config when object is used as a string"
> if not self.__cfgdata:
> return "# empty"
> - return "\n".join(["%s: %s" % (k, v) for k, v in list(self.__cfgdata.items())]) + "\n"
> + return "\n".join([f"{k}: {v}" for k, v in list(self.__cfgdata.items())]) + "\n"
>
>
> def __setattr__(self, key, val):
> --
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class
2023-06-01 20:27 ` [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class Anubhav Shelat
@ 2023-06-06 15:22 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-06 15:22 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class. If it doesn't, then the system has IPv6 disabled, and that chunk of code is passed.
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/newnet.py | 28 ++++++++++++++++------------
> 1 file changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/rteval/sysinfo/newnet.py b/rteval/sysinfo/newnet.py
> index 63417d9e59f1..2911400ceb6c 100644
> --- a/rteval/sysinfo/newnet.py
> +++ b/rteval/sysinfo/newnet.py
> @@ -72,19 +72,23 @@ class IPv6Addresses():
> and a list of ipv6addresses
> '''
> MYP = '/proc/net/if_inet6'
> - with open(MYP, 'r') as f:
> - mystr = f.readline().strip()
> - while len(mystr) > 0:
> - ipv6addr , _, _, _, _, intf = mystr.split()
> - ipv6addr = compress_iv6(ipv6addr)
> - if intf == 'lo':
> - mystr = f.readline().strip()
> - continue
> - if intf not in self.data:
> - self.data[intf] = [ipv6addr]
> - else:
> - self.data[intf].append(ipv6addr)
> + try:
> + with open(MYP, 'r') as f:
> mystr = f.readline().strip()
> + while len(mystr) > 0:
> + ipv6addr , _, _, _, _, intf = mystr.split()
> + ipv6addr = compress_iv6(ipv6addr)
> + if intf == 'lo':
> + mystr = f.readline().strip()
> + continue
> + if intf not in self.data:
> + self.data[intf] = [ipv6addr]
> + else:
> + self.data[intf].append(ipv6addr)
> + mystr = f.readline().strip()
> + # if IPv6 is disabled, the if_net6 files does not exist, so we can pass
> + except FileNotFoundError:
> + pass
>
> class IPv4Addresses():
> ''' Obtains a list of IPv4 addresses from the proc file system '''
> --
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 03/10] rteval: Use f-strings in cputopology
2023-06-01 20:27 ` [PATCH v2 03/10] rteval: Use f-strings in cputopology Anubhav Shelat
@ 2023-06-12 18:32 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:32 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in cputopology
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/cputopology.py | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/rteval/sysinfo/cputopology.py b/rteval/sysinfo/cputopology.py
> index ced7e1f295b7..2bb632312320 100644
> --- a/rteval/sysinfo/cputopology.py
> +++ b/rteval/sysinfo/cputopology.py
> @@ -124,9 +124,7 @@ def unit_test(rootdir):
> x.saveFormatFileEnc('-', 'UTF-8', 1)
>
> print(" ---- getCPUcores() / getCPUscokets() ---- ")
> - print("CPU cores: %i (online: %i) - CPU sockets: %i" % (cputop.cpu_getCores(False),
> - cputop.cpu_getCores(True),
> - cputop.cpu_getSockets()))
> + print(f"CPU cores: {cputop.cpu_getCores(False)} (online: {cputop.cpu_getCores(True)}) - CPU sockets: {cputop.cpu_getSockets()}")
> return 0
> except Exception as e:
> # import traceback
> --
> 2.31.1
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 04/10] rteval: Use f-strings in kernel.py
2023-06-01 20:27 ` [PATCH v2 04/10] rteval: Use f-strings in kernel.py Anubhav Shelat
@ 2023-06-12 18:35 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:35 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in kernel.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/kernel.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rteval/sysinfo/kernel.py b/rteval/sysinfo/kernel.py
> index f2e9d72ac2ef..ba5cadda40c5 100644
> --- a/rteval/sysinfo/kernel.py
> +++ b/rteval/sysinfo/kernel.py
> @@ -47,8 +47,8 @@ class KernelInfo:
> policies = {'DLN': 'deadline', 'FF':'fifo', 'RR':'rrobin', 'TS':'other', '?':'unknown'}
> ret_kthreads = {}
> self.__log(Log.DEBUG, "getting kthread status")
> - cmd = '%s -eocommand,pid,policy,rtprio,comm' % getcmdpath('ps')
> - self.__log(Log.DEBUG, "cmd: %s" % cmd)
> + cmd = f"{getcmdpath('ps')} -eocommand,pid,policy,rtprio,comm"
> + self.__log(Log.DEBUG, f"cmd: {cmd}")
> c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
> for p in c.stdout:
> v = p.strip().split()
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 05/10] rteval: Use f-strings in memory.py
2023-06-01 20:27 ` [PATCH v2 05/10] rteval: Use f-strings in memory.py Anubhav Shelat
@ 2023-06-12 18:39 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:39 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
o
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in memory.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/memory.py | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/rteval/sysinfo/memory.py b/rteval/sysinfo/memory.py
> index 7c5fd6f315cf..cc2fa2cfa4be 100644
> --- a/rteval/sysinfo/memory.py
> +++ b/rteval/sysinfo/memory.py
> @@ -49,7 +49,7 @@ class MemoryInfo:
> if l.startswith('MemTotal:'):
> parts = l.split()
> if parts[2].lower() != 'kb':
> - raise RuntimeError("Units changed from kB! (%s)" % parts[2])
> + raise RuntimeError(f"Units changed from kB! ({parts[2]})")
> rawsize = int(parts[1])
> f.close()
> break
> @@ -76,7 +76,7 @@ class MemoryInfo:
>
> memsize = self.mem_get_size()
> mem_n = libxml2.newNode("memory_size")
> - mem_n.addContent("%.3f" % memsize[0])
> + mem_n.addContent(f"{memsize[0]:.3f}")
> mem_n.newProp("unit", memsize[1])
> rep_n.addChild(mem_n)
>
> @@ -88,8 +88,8 @@ def unit_test(rootdir):
> import sys
> try:
> mi = MemoryInfo()
> - print("Numa nodes: %i" % mi.mem_get_numa_nodes())
> - print("Memory: %i %s" % mi.mem_get_size())
> + print(f"Numa nodes: {mi.mem_get_numa_nodes()}")
> + print(f"Memory: {int(mi.mem_get_size()[0])} {mi.mem_get_size()[1]}")
> except Exception as e:
> import traceback
> traceback.print_exc(file=sys.stdout)
> --
> 2.31.1
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 06/10] rteval: Use f-strings in osinfo
2023-06-01 20:27 ` [PATCH v2 06/10] rteval: Use f-strings in osinfo Anubhav Shelat
@ 2023-06-12 18:50 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:50 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in osinfo.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/osinfo.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py
> index ead5e3939cfa..83dc78b96fdd 100644
> --- a/rteval/sysinfo/osinfo.py
> +++ b/rteval/sysinfo/osinfo.py
> @@ -55,9 +55,9 @@ class OSInfo:
> shutil.copyfile(dpath, os.path.join(repdir, "dmesg"))
> return
> if os.path.exists('/usr/bin/dmesg'):
> - subprocess.call('/usr/bin/dmesg > %s' % os.path.join(repdir, "dmesg"), shell=True)
> + subprocess.call(f'/usr/bin/dmesg > {os.path.join(repdir, "dmesg")}', shell=True)
> return
> - print("dmesg file not found at %s and no dmesg exe found!" % dpath)
> + print(f"dmesg file not found at {dpath} and no dmesg exe found!")
>
>
>
> @@ -69,16 +69,16 @@ class OSInfo:
> else:
> raise RuntimeError("Can't find sosreport/sysreport")
>
> - self.__logger.log(Log.DEBUG, "report tool: %s" % exe)
> + self.__logger.log(Log.DEBUG, f"report tool: {exe}")
> options = ['-k', 'rpm.rpmva=off',
> '--name=rteval',
> '--batch']
>
> self.__logger.log(Log.INFO, "Generating SOS report")
> - self.__logger.log(Log.INFO, "using command %s" % " ".join([exe]+options))
> + self.__logger.log(Log.INFO, f"using command {' '.join([exe]+options)}")
> subprocess.call([exe] + options)
> for s in glob('/tmp/s?sreport-rteval-*'):
> - self.__logger.log(Log.DEBUG, "moving %s to %s" % (s, repdir))
> + self.__logger.log(Log.DEBUG, f"moving {s} to {repdir}")
> shutil.move(s, repdir)
>
>
> @@ -118,7 +118,7 @@ def unit_test(rootdir):
> log = Log()
> log.SetLogVerbosity(Log.DEBUG|Log.INFO)
> osi = OSInfo(logger=log)
> - print("Base OS: %s" % osi.get_base_os())
> + print(f"Base OS: {osi.get_base_os()}")
>
> print("Testing OSInfo::copy_dmesg('/tmp'): ", end=' ')
> osi.copy_dmesg('/tmp')
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 07/10] rteval: Use f-strings in services.py
2023-06-01 20:27 ` [PATCH v2 07/10] rteval: Use f-strings in services.py Anubhav Shelat
@ 2023-06-12 18:58 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:58 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in services.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/services.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/rteval/sysinfo/services.py b/rteval/sysinfo/services.py
> index c85980e19165..a87b4abeea76 100644
> --- a/rteval/sysinfo/services.py
> +++ b/rteval/sysinfo/services.py
> @@ -55,17 +55,17 @@ class SystemServices:
> break
> if not servicesdir:
> raise RuntimeError("No services dir (init.d) found on your system")
> - self.__log(Log.DEBUG, "Services located in %s, going through each service file to check status" % servicesdir)
> + self.__log(Log.DEBUG, f"Services located in {servicesdir}, going through each service file to check status")
> ret_services = {}
> for service in glob.glob(os.path.join(servicesdir, '*')):
> servicename = os.path.basename(service)
> if not [1 for p in reject if fnmatch.fnmatch(servicename, p)] \
> and os.access(service, os.X_OK):
> - cmd = '%s -qs "\(^\|\W\)status)" %s' % (getcmdpath('grep'), service)
> + cmd = f'{getcmdpath("grep")} -qs "\(^\|\W\)status)" {service}'
> c = subprocess.Popen(cmd, shell=True, encoding='utf-8')
> c.wait()
> if c.returncode == 0:
> - cmd = ['env', '-i', 'LANG="%s"' % os.environ['LANG'], 'PATH="%s"' % os.environ['PATH'], 'TERM="%s"' % os.environ['TERM'], service, 'status']
> + cmd = ['env', '-i', f'LANG="{os.environ["LANG"]}"', f'PATH="{os.environ["PATH"]}"', f'TERM="{os.environ["TERM"]}"', service, 'status']
> c = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
> c.wait()
> if c.returncode == 0 and (c.stdout.read() or c.stderr.read()):
> @@ -79,8 +79,8 @@ class SystemServices:
>
> def __get_services_systemd(self):
> ret_services = {}
> - cmd = '%s list-unit-files -t service --no-legend' % getcmdpath('systemctl')
> - self.__log(Log.DEBUG, "cmd: %s" % cmd)
> + cmd = f'{getcmdpath("systemctl")} list-unit-files -t service --no-legend'
> + self.__log(Log.DEBUG, f"cmd: {cmd}")
> c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
> for p in c.stdout:
> # p are lines like b'servicename.service status'
> @@ -133,7 +133,7 @@ def unit_test(rootdir):
>
> return 0
> except Exception as err:
> - print("** EXCEPTION: %s" % str(err))
> + print(f"** EXCEPTION: {str(err)}")
> return 1
>
>
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 08/10] rteval: Use f-strings in tools.py
2023-06-01 20:27 ` [PATCH v2 08/10] rteval: Use f-strings in tools.py Anubhav Shelat
@ 2023-06-12 18:59 ` John Kacur
0 siblings, 0 replies; 20+ messages in thread
From: John Kacur @ 2023-06-12 18:59 UTC (permalink / raw)
To: Anubhav Shelat; +Cc: linux-rt-users
On Thu, 1 Jun 2023, Anubhav Shelat wrote:
> Use f-strings in tools.py
>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
> rteval/sysinfo/tools.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rteval/sysinfo/tools.py b/rteval/sysinfo/tools.py
> index 3993da413d8a..aa00b3d3eafc 100644
> --- a/rteval/sysinfo/tools.py
> +++ b/rteval/sysinfo/tools.py
> @@ -40,5 +40,5 @@ def getcmdpath(which):
> pathSave[which] = cmdfile
> break
> if not pathSave[which]:
> - raise RuntimeError("Command '%s' is unknown on this system" % which)
> + raise RuntimeError(f"Command '{which}' is unknown on this system")
> return pathSave[which]
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2023-06-12 19:00 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 20:27 [PATCH v2 00/10] Cover Letter Anubhav Shelat
2023-06-01 20:27 ` [PATCH v2 01/10] rteval: Use f-strings in rtevalclient.py Anubhav Shelat
2023-06-05 19:28 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 02/10] rteval: Use f-strings in rtevalConfig Anubhav Shelat
2023-06-05 19:31 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 03/10] rteval: Use f-strings in cputopology Anubhav Shelat
2023-06-12 18:32 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 04/10] rteval: Use f-strings in kernel.py Anubhav Shelat
2023-06-12 18:35 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 05/10] rteval: Use f-strings in memory.py Anubhav Shelat
2023-06-12 18:39 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 06/10] rteval: Use f-strings in osinfo Anubhav Shelat
2023-06-12 18:50 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 07/10] rteval: Use f-strings in services.py Anubhav Shelat
2023-06-12 18:58 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 08/10] rteval: Use f-strings in tools.py Anubhav Shelat
2023-06-12 18:59 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 09/10] Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class Anubhav Shelat
2023-06-06 15:22 ` John Kacur
2023-06-01 20:27 ` [PATCH v2 10/10] rteval: Use f-strings in __init__.py Anubhav Shelat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).