- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get output from glance executed by cgi ...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 02:55 PM
03-31-2003 02:55 PM
How to get output from glance executed by cgi script
My cgi script executes:
export HOME=/tmp
/opt/perf/bin/glance -iterations 2 -all_trans -adviser_only -f /tmp/glance.out 2>/dev/null; cat /tmp/glance.o
ut
Note: its being executed as user www.
I'd like to get the output from glance (as excuted from a cgi script) but I always get the message :
WARNING: Unable to open ".glancerc_hp", "adviser.out", and "glance.err".
Either your $HOME environment is not defined or there is no write
access to your $HOME directory. GlancePlus cannot save data to
customize configuration, or to adviser output or to an error log.
To correct this problem set $HOME to a directory with write
permission and re-start GlancePlus.
If you don't make this change GlancePlus will continue without
these functions.
Does anyone have a suggestion how to fix this?
Thank you in advance,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 02:59 PM
03-31-2003 02:59 PM
Re: How to get output from glance executed by cgi script
watch for the PID
kill
or if its sticky
kill -9
This might nail other processes owned by www.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 03:05 PM
03-31-2003 03:05 PM
Re: How to get output from glance executed by cgi script
It looks like Glance is complaining because your 'www' user does not have a valid $HOME directory. Can your 'www' user write to /tmp?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 06:39 PM
03-31-2003 06:39 PM
Re: How to get output from glance executed by cgi script
Can you run this script manually and see if it prints anything?
Why are you setting $HOME to /tmp?.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2003 05:46 AM
04-01-2003 05:46 AM
Re: How to get output from glance executed by cgi script
I did the export HOME=/tmp to insure that www had write permission to create the files.glancerc_hp, adviser.out and glance.err.
I did an su - www (from root) and ran the command and it behaves the same (I had done this prior to posting to the forum), the user www had no problem manually touching, deleting, etc. the files /tmp/.glancerc_hp, /tmp/adviser.out and /tmp/glance.err
I also modified www's default directory (in /etc/passwd) just to make damn sure and I still have the same problem.
However the WARNING from glance still appears! and it still waits for a Return key to continue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2003 05:56 AM
04-01-2003 05:56 AM
Re: How to get output from glance executed by cgi script
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2003 06:52 AM
04-01-2003 06:52 AM
Re: How to get output from glance executed by cgi script
I was able to duplicate and fix your issue.
1. Create /home/www with appropriate permissions
2. create glance-cgi in your cgi-bin:
#!/bin/sh
set -x
print 'Content-type: text/html\n\n';
export HOME=/home/www
/opt/perf/bin/glance -iterations 2 -all_trans -bootup -adviser_only -f /tmp/glan
ce.out;cat /tmp/glance.out
3. Make sure it is executable.
4. http://yourhost/cgi-bin/glance-cgi
Viola.
Regards,
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 08:55 AM
04-04-2003 08:55 AM
Re: How to get output from glance executed by cgi script
I'm getting a bit closer but still no luck. By creating the user, with a complete user profile and home directory I can run the command as www in a terminal window, however when I run it in other than a terminal window (e.g. cron or via a cgi script) I do not get any output! The file /tmp/glance.out is 0 bytes!
Is there something I can set to get glance to think a terminal is executing it?