Hello!!
I am relatively new to shell scripting.
I have a cgi which is a shell script: proj_web_apps.cgi
#!/usr/bin/ksh
. ../config/PROJ_ENV
# Limit the CPU time allowed for the process
ulimit -t $ULIMIT_CPU > /dev/null
$AWA_/bin/proj_web_apps
I would like to monitor who invoke this cgi and at what time. The user name and the ip address has to be appended to a text file. The name of the cgi is proj_web_apps.cgi. $REMOTE_ADDR is the cgi environment variable that tells who invoked the script.
So the text file should have:
CGI_NAME IPADDRESS TIMESTAMP
As requests come in, the above information keeps appending to the text file. I would greatly appreciate if you could provide me some help.
Thanks in advance.
I am relatively new to shell scripting.
I have a cgi which is a shell script: proj_web_apps.cgi
#!/usr/bin/ksh
. ../config/PROJ_ENV
# Limit the CPU time allowed for the process
ulimit -t $ULIMIT_CPU > /dev/null
$AWA_/bin/proj_web_apps
I would like to monitor who invoke this cgi and at what time. The user name and the ip address has to be appended to a text file. The name of the cgi is proj_web_apps.cgi. $REMOTE_ADDR is the cgi environment variable that tells who invoked the script.
So the text file should have:
CGI_NAME IPADDRESS TIMESTAMP
As requests come in, the above information keeps appending to the text file. I would greatly appreciate if you could provide me some help.
Thanks in advance.