This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

System parameters
#3
Here you have some documentation which you can use to check some parameters(network, mounts, disk space):
proc file system
[url=https://www.centos.org/docs/5/html/5.1/Deployment_Guide/ch-proc.htmlhttps://www.centos.org/docs/5/html/5.1/Deployment_Guide/ch-proc.html][/url]
Example of checking memory usage:
Code:
f = assert (io.popen("cat /proc/meminfo"))
response = {}
for line in f:lines() do
 table.insert(response, line)
end -- for loop
 
f:close()
log(response)

Example of checking how many and what are the names of files on '/home/ftp/':
Code:
f = assert (io.popen ("ls /home/apps"))
response = {}
for line in f:lines() do
 table.insert(response, line)
end -- for loop
 
f:close()
log('There are ' .. #response .. ' files on the server.',response)
Reply


Messages In This Thread
System parameters - by baggins - 09.03.2017, 12:37
RE: System parameters - by baggins - 12.03.2017, 22:26
RE: System parameters - by buuuudzik - 13.03.2017, 07:16
RE: System parameters - by admin - 13.03.2017, 07:31
RE: System parameters - by baggins - 13.03.2017, 07:58
RE: System parameters - by admin - 13.03.2017, 07:59
RE: System parameters - by baggins - 13.03.2017, 08:12
RE: System parameters - by Thomas - 13.03.2017, 10:33
RE: System parameters - by buuuudzik - 13.03.2017, 19:29
RE: System parameters - by admin - 13.03.2017, 10:59

Forum Jump: