- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftstatus command in shell script not working with ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
02-06-2008 05:30 AM
02-06-2008 05:30 AM
ftstatus command in shell script not working with cron scheduled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:32 AM
02-06-2008 05:32 AM
Re: ftstatus command in shell script not working with cron scheduled
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:32 AM
02-06-2008 05:32 AM
Re: ftstatus command in shell script not working with cron scheduled
load the user profile at the beginning of your script to setup your environment.
. /home/username/.profile
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:42 AM
02-06-2008 05:42 AM
Re: ftstatus command in shell script not working with cron scheduled
is this ok.
#!/bin/sh
./root/.profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:49 AM
02-06-2008 05:49 AM
Re: ftstatus command in shell script not working with cron scheduled
Due to a limited environment in cron you have only a very limited PATH variable by default.
Sourcing the profile is not the best workaround here.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:57 AM
02-06-2008 05:57 AM
Re: ftstatus command in shell script not working with cron scheduled
this is the line in cron and the new.sh file look like this
#!/bin/sh
df -k >>/BOC_KK/xyz.txt
ftstatus >>/BOC_KK/xyz.txt
when i am executing manually new.sh with sh new.sh it creates a file xyz.txt in /BOC_KK,but the same thing i am putting through cron it outputs xyz.txt with only df -k results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:02 AM
02-06-2008 06:02 AM
Re: ftstatus command in shell script not working with cron scheduled
/usr/bin/df -k >>/BOC_KK/xyz.txt
/home/kingkhan/ftstatus >>/BOC_KK/xyz.txt
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:02 AM
02-06-2008 06:02 AM
Re: ftstatus command in shell script not working with cron scheduled
Instead of
ftstatus
you should use
/full/path/to/ftstatus
Use "whereis ftstatus" to get the path.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:07 AM
02-06-2008 06:07 AM
Re: ftstatus command in shell script not working with cron scheduled
ftstatus:
matrix:root>
i am getting this output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:11 AM
02-06-2008 06:11 AM
Re: ftstatus command in shell script not working with cron scheduled
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:36 AM
02-06-2008 06:36 AM
Re: ftstatus command in shell script not working with cron scheduled
which ftstatus
-or-
whence ftstatus
they should report the full path to the app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 06:46 AM
02-06-2008 06:46 AM
Re: ftstatus command in shell script not working with cron scheduled
/opt/HP-AIN/SS7/bin/ftstatus >>/BOC_KK/xyz.txt
but no improvement . still i am not getting the expected results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 11:40 PM
02-06-2008 11:40 PM
Re: ftstatus command in shell script not working with cron scheduled
You'll need to explain what you got and what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 04:41 AM
02-07-2008 04:41 AM
Re: ftstatus command in shell script not working with cron scheduled
matrix:root> ftstatus
System : matrix
------------------------------------------------------------
FT_Controller(FTC) ACTIVE[OK]
DataStore ACTIVE
ss7SNMPAgent ACTIVE
SS7_Stack_1_ftc(subFTC) ACTIVE[OK]
SS7_Stack_1_TDx_1 ACTIVE
SS7_Stack_1 ACTIVE
SS7_Stack_2_ftc(subFTC) ACTIVE[OK]
SS7_Stack_2_TDx_1 ACTIVE
SS7_Stack_2 ACTIVE
-------------------------------------------
iam able to get this output one i manually execute the script,but the same thing i am not getting while the script is scheduled through cron.plz help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 04:42 AM
02-07-2008 04:42 AM
Re: ftstatus command in shell script not working with cron scheduled
root> ftstatus
System : matrix
------------------------------------------------------------
FT_Controller(FTC) ACTIVE[OK]
DataStore ACTIVE
ss7SNMPAgent ACTIVE
SS7_Stack_1_ftc(subFTC) ACTIVE[OK]
SS7_Stack_1_TDx_1 ACTIVE
SS7_Stack_1 ACTIVE
SS7_Stack_2_ftc(subFTC) ACTIVE[OK]
SS7_Stack_2_TDx_1 ACTIVE
SS7_Stack_2 ACTIVE
-------------------------------------------
iam able to get this output one i manually execute the script,but the same thing i am not getting while the script is scheduled through cron.plz help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 04:57 AM
02-07-2008 04:57 AM
Re: ftstatus command in shell script not working with cron scheduled
But what are you getting?
>i manually execute the script,
Have you put absolute paths for every executable you use in your script?
Or changed PATH to include them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 05:07 AM
02-07-2008 05:07 AM
Re: ftstatus command in shell script not working with cron scheduled
#!/bin/sh
/usr/bin/df -k >>/BOC_KK/xyz.txt
/opt/HP-AIN/SS7/bin/ftstatus >>/BOC_KK/xyz.txt
Pete
Pete