- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- glance fails from a script, ok from command line
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
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
04-19-2001 01:54 PM
04-19-2001 01:54 PM
glance -adviser_only -syntax adviser.syntax -j60 > glance.out 2>glance.err &
The process continues to run in the background until a 'kill' is executed. But if I do:
sh
the background glance process terminates immediately, while the following gets logged to glance.err:
sh: glance: Execute permission denied.
Can you help me figure out the cause of the problem?
My userid is 0 (root), default shell: /usr/bin/sh . The output of 'll /opt/perf/bin/glance' is:
-r-sr-xr-x 1 root bin 614400 Oct 6 2000 /opt/perf/bin/glance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2001 02:19 PM
04-19-2001 02:19 PM
SolutionThe problem has nothing to do with 'glance' but rather the way in which you use 'sh' to invoke it.
Consider:
# date #...works, obviously
# sh date # ...gives Execute permission denied.
# sh -c date #...works
The '-c' option means read commands from the string which follows. Thus, in you case:
# sh -c "glance -adviser_only -syntax adviser.syntax -j60 >glance.out 2>glance.err &"
...will provide that which you seek.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2001 02:29 PM
04-19-2001 02:29 PM
Re: glance fails from a script, ok from command line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2001 07:49 PM
04-19-2001 07:49 PM
Re: glance fails from a script, ok from command line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2001 11:57 AM
05-22-2001 11:57 AM
Re: glance fails from a script, ok from command line
sh -c "glance -adviser_only -syntax $DIR/gpm -iterations 3 -j 30 >> $DIR/glance.
out &"
I get the output file glance.out but it's empty. I have put a date command before and after the command, and within 1 second both dates return.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2001 12:23 PM
05-22-2001 12:23 PM
Re: glance fails from a script, ok from command line
I think you need to use the full path:
sh -c "/opt/perf/bin/glance -adviser_only -syntax $DIR/gpm -iterations 3 -j 30 >> $DIR/glance.out &
Mladen