When I wanted to test if the alert works well, I created this small script to open as many files as it can:
#!/usr/bin/env python3
import time
files = []
try:
for f in range(1, 1025):
fh = open("test-{0}".format(f), "w")
print ("Opened file number ...", f)
files.append(fh)
except IOError as e:
print ("IOError: ", str(e))
input("Press any key to exit")
so while running this script, the output is as follow:
...
Opened file number ... 1020
Opened file number ... 1021
IOError: [Errno 24] Too many open files: 'test-1022'
Press any key to exit
but the exporter doesn't report any openfile for the python3 process, and namedprocess_namegroup_worst_fd_ratio indicates 0
When I wanted to test if the alert works well, I created this small script to open as many files as it can:
so while running this script, the output is as follow:
but the exporter doesn't report any openfile for the python3 process, and namedprocess_namegroup_worst_fd_ratio indicates 0
running lsof on the server returns