Operating System - HP-UX
1834457 Members
2791 Online
110067 Solutions
New Discussion

Logs files in Virtual Vault

 
Kenny Chau
Trusted Contributor

Logs files in Virtual Vault

Hi all,

I had a web server running in HP-UX Virtual Vault OS in A-class machine. There are some logs files that growth quite rapidly. So I want to trim those log files. However, my colleagues had deleted one of the log files accidentally. The log files are located in /opt/server4/https-/logs and the log files are "access" and "errors". My colleagues had deleted the "errors" and I had tried to touch a same file with the same owner, group and permission, but the file did not growth. It seems the log can not update that file. So in this situation, what can I do to make the log update that file?

Thanks very much.
Kenny.
Kenny
9 REPLIES 9
S.K. Chan
Honored Contributor

Re: Logs files in Virtual Vault

I'm thinking you probably got to restart the http daemon or whatever processes that writes to these log files.
Kenny Chau
Trusted Contributor

Re: Logs files in Virtual Vault

Thanks for your quick reply, SK. I had found that there is a ns-httpd daemon running which I think it will write logs to those files. However, how should stop this daemon and restart it? I found it in /opt/server4/bin/https/bin but the permission is 010. So how can I start this daemon? Any effect to the servers or our web page?

Thanks.
Kenny.
Kenny
S.K. Chan
Honored Contributor

Re: Logs files in Virtual Vault

The safest way to restart any "non-OS" program/process is via the startup script in /sbin/init.d. Is there one for ns-httpd in this directory ? There should be otherwise how would you startup the daemon each time the system reboot, right? For the other question, I can only speak for myself where I have Netscape Enterprise server and restarting ns-httpd would definately affect the users where they would just not being able to surf until it comes up.
Kenny Chau
Trusted Contributor

Re: Logs files in Virtual Vault

Thanks SK. However, I can not find the ns-httpd under /sbin/init.d directory. I only find that daemon under /opt/server4/bin/https/bin. So I am not sure how to restart it.

Do you have any idea?

Thanks.
Kenny.
Kenny
S.K. Chan
Honored Contributor

Re: Logs files in Virtual Vault

It may not be the file "ns-httpd" but rather embedded in another script file. Do this ..
# cd /sbin/init.d
# grep httpd *
==> if not found then you'll have to restart ns-httpd manually.

I can't quite remember the command .. the way I used to do it is like so ..

# cd $NETSCAPE/bin
==> I have $NETSCAPE set in my profile
# ./ns-httpd -d $NETSCAPE-CONF
==> again I can't recall the full path of the config file.

Lets look at the process you have.. can you post this ..
# ps -ef|grep httpd
That will help to determine how the daemon is startup, which option and which config file, etc.
Kenny Chau
Trusted Contributor

Re: Logs files in Virtual Vault

Well, only the file "vvmgrhttpd" contains the word httpd and all the lines contain the word "httpd" is all from the word "vvmgrhttpd". So I don't know if this daemon is for starting the ns-httpd daemon.

Also, the ps -ef | grep httpd is:

ns-httpd -d /opt/server4/https-/config
/opt/vaultTS/bin/vvmgrhttpd
ns-httpd -d /opt/server4/https-admserv/config

So what command can I use to start the ns-httpd daemon?

Thanks.
Kenny.
Kenny
S.K. Chan
Honored Contributor

Re: Logs files in Virtual Vault

OK we're close .. it looks like "vvmgrhttpd" is a seperate daemon from the ns-httpd, so we can't use the startup in /sbin/init.d.
That leaves us with these ..

ns-httpd -d /opt/server4/https-/config
and
ns-httpd -d /opt/server4/https-admserv/config

Since I'm not sure if both of them are parent-child related processes or separate processes I still need the PID, PPID from the output

# ps -ef|grep ns-httpd

This time post the complete line so that we can see the PID and PPID. Thanks..

Gnananandhan
Frequent Advisor

Re: Logs files in Virtual Vault

Hi,
In netscape, you can run many instance of http. In your case it is only one.
ie.
"ns-httpd -d
/opt/server4/https-admserv/config"

So in general you should have a 'start', 'restart' and 'stop' script under "/opt/server4/https-admserv/"
With the help of this you can restart your netscape. Also the logfile is not getting generated because of the time-stamp. So on re-starting it should go fine.


Regards,
Gnana A.
If there is a better way to do it, find it !
Kenny Chau
Trusted Contributor

Re: Logs files in Virtual Vault

Thanks guys for your answers. I think I should need to restart the ns-httpd daemon. I had searched from the ITRC site that there is a watchdog process(uxwdog) running together with the ns-httpd and if I kill the ns-httpd daemon, it should restart automatically, which is the same as Gnana mentioned: restart, as I had read the script. However, I can not do this at this moment because my boss did not allow to. So I will try this later to see if it will fix my problem and I will update you guys for this.

Thanks very much for your help.
Kenny.
Kenny