- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- fbackup return value
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
Discussions
Discussions
Forums
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
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
тАО07-04-2001 08:07 PM
тАО07-04-2001 08:07 PM
fbackup return value
If it returns a 0, then I know that the backup was successful. What if it returns a different value? For example $? = 1024. I would like to know what does it stand for.
Is there a reference table where I can view all the different values to see what does it stands for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2001 11:02 PM
тАО07-04-2001 11:02 PM
Re: fbackup return value
fbackup returns 0 upon normal completion, 1 if it is interrupted but allowed to save its state for possible restart, and 2 if any error conditions prevent the session from completing.
There is no other return value available in fbackup.
Regards,
Paulson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2001 01:13 AM
тАО07-05-2001 01:13 AM
Re: fbackup return value
ie man fbackup and search (/) for RETURNS to get a description of all possible returns and their meaning.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2001 04:10 AM
тАО07-05-2001 04:10 AM
Re: fbackup return value
The fbackup return codes are :
0 : upon normal completion.
1 : If it is interrupted but allowed to save its state for possible restart.
2 : If any error conditions prevent the session from completing.
4 : If any warning conditions are encountered.
This for error code and for the text explaining what had happend :
IT WILL BE WRITTEN TO THE SERVER'S CONSOLE.
HTH.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2001 09:37 AM
тАО07-05-2001 09:37 AM
Re: fbackup return value
Perhaps you're calling fbackup from a C program or
Perl script via system() or a fork()/exec()/wait(). In this
case, the return value is encoded per the wait(2) man
page, so you need use WEXITSTATUS to find out what
the real exit status is. A 1024 probably means that
the return code was actually 4 (1024 >> 8).
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2001 11:36 AM
тАО07-05-2001 11:36 AM
Re: fbackup return value
You can see a list 'fbackup's error codes by number and associated text here:
# strings /usr/lib/nls/C/fbackup.cat
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2001 07:19 PM
тАО07-05-2001 07:19 PM
Re: fbackup return value
sorry for not explaining in more detail.
I am calling the fbackup function inside a Perl script using system(). For example:
system("/usr/sbin/fbackup -v -f /dev/rmt/1m -i /");
if ($? == 0) {
print "Backup successful!";
}
else {
print "Error code = $?";
}
Gregory,
Can you please explain a bit more in detail about WEXITSTATUS. How did you derive a 1024 to be a return code of 4?
Thanks again.
Kuan Wong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 02:03 AM
тАО07-06-2001 02:03 AM
Re: fbackup return value
You might also want to examine the contents of the perl ERRNO variable $!, which should contain the error returned by the system call. In your case:
system("/usr/sbin/fbackup -v -f /dev/rmt/1m -i /") || die "ERROR: $!\n";
HTH.
Regards,
Vincent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 10:49 AM
тАО07-06-2001 10:49 AM
Re: fbackup return value
$? variable for more info. It'll tell you to divide the
return value by 256 or right shift it by 8 bits to get
the actual return value from the called program.
So (1024 / 256) = (1024 >> 8) = 4.
To be more precise, use Perl's POSIX module
to get acess to the WEXITSTATUS and associated
macros, which can be used to decode all parts of
system()'s return value. See the docs for Perl's POSIX
module and the HP-UX man page for wait(2) (i.e.
"man POSIX" and "man 2 wait").
Example:
use POSIX;
$i = system("some program");
if (WIFEXITED($i)) {
printf "exited normally with return code %d\n", WEXITSTATUS($i);
}
elsif (WIFSIGNALED($i)) {
printf "exited due to signal %d\n", WTERMSIG($i);
}
else {
print "exited for some other reason\n";
}