Sponsored Content
Top Forums Programming how to capture OS name using C/C++ code Post 302360259 by jlliagre on Thursday 8th of October 2009 12:27:09 PM
Old 10-08-2009
Here is a clue:

uts = Unix Time-sharing System
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capture Oracle return code in shell script

I am using the following code in my shell script list=`sqlplus -s $user/$pwd@$dbms<<EOF WHENEVER SQLERROR EXIT SQL.SQLCODE set pagesize 0 feedback off verify off heading off echo off select * from control_tbl where src_nm=$3 and extrct_nm=$4; exit SQL.SQLCODE; EOF` ERROR=$?... (1 Reply)
Discussion started by: Vikas Sood
1 Replies

2. Shell Programming and Scripting

capture ftp return code..PLZ HELP

Hi all, i have written a code to ftp a file from one server to other.The ftp is happeneing successfully,but i am not able to capture the return code,to check if ftp has failed. plz help me to find out the return code....this is urgent below is the code i have written... (3 Replies)
Discussion started by: anju
3 Replies

3. Shell Programming and Scripting

How to capture status code and echo a message

Im trying to execute application and its return code is below IF Status code=o echo "........" else Staus Code =-2 DJRE then echo "......" Can any one help me how to handle the status code and echo some message. (12 Replies)
Discussion started by: laknar
12 Replies

4. UNIX for Dummies Questions & Answers

How to capture exit code for a bg job

If I execute a job in background (in ksh or bash), how would I capture the exit code for that job? Thanks, - CB (1 Reply)
Discussion started by: ChicagoBlues
1 Replies

5. Shell Programming and Scripting

Capture http response code from wget

Hi All, I am using wget to call a url..i am getting 202 if it is successful. if not i am forcing the response code to 417. how can i capture the response code and print 0 if it is 202 and 1 if it is not 202 any ideas, please share Thanks, Jack. (2 Replies)
Discussion started by: jack3698
2 Replies

6. Shell Programming and Scripting

Comparing files and capture return code

Hi, I would like to compare 2 files, and have a return code write to a file. regardless of the files contents are the same the code should be writing to a file (if both files contents are same then return code 0). A simple example will be great :) Thanks (3 Replies)
Discussion started by: khchong
3 Replies

7. Shell Programming and Scripting

How to capture script return code?

Hi I am executing database backup via shell script (Korn). The backup log is long, but I would like to capture only the last line so I can send an email if it fails Example of failed backup (only last 3 lines) BR0056I End of database backup: bejbofoh.aff 2012-07-26 07.31.21 BR0280I... (7 Replies)
Discussion started by: nimo
7 Replies

8. Shell Programming and Scripting

How to capture exit code of child script and send it to parent script?

#!/usr/local/bin/bash set -vx /prod/HotelierLinks/palaceLink/bin/PalacefilesWait /prod/HotelierLinks/palaceLink/bin/prodEnvSetup 03212013 & if then echo "fatal error: Palace/HardRock failed!!!!" 1>&2 echo "Palace Failed" | mail -s "Link Failed at Palace/HardRock" -c... (1 Reply)
Discussion started by: aroragaurav.84
1 Replies

9. Shell Programming and Scripting

How to capture 3 digit return code of ftp??

is it possible to capture the 3 digit return code of ftp commands in a local variable inside a shell script? Code: ftp remoteserver << EOFTP quote USER uid quote PASS pass prompt cd remote_directory mput file.txt bye EOFTP in the above script, if cd ... (4 Replies)
Discussion started by: Little
4 Replies

10. Shell Programming and Scripting

Script to retry FTP commands if unsuccessful and capture the failure status code.

I am using the below code to ftp file onto another server FTP_LOG_FILE=${CURR_PRG_NAME}- ${FTP_FILE}-`date +%Y%m%d%H%M%S`.log ftp -ivn ${FTP_HOST} ${FTP_PORT} << ENDFTP >> ${EDI_LOG_DIR}/${FTP_LOG_FILE} 2>&1 user ${FTP_USER} ${FTP_PSWD} lcd... (2 Replies)
Discussion started by: akashdeepak
2 Replies
dispadmin(1M)                                             System Administration Commands                                             dispadmin(1M)

NAME
dispadmin - process scheduler administration SYNOPSIS
dispadmin -l dispadmin -c class -g [-r res] dispadmin -d [class] DESCRIPTION
The dispadmin command displays or changes process scheduler parameters while the system is running. dispadmin does limited checking on the values supplied in file to verify that they are within their required bounds. The checking, however, does not attempt to analyze the effect that the new values have on the performance of the system. Inappropriate values can have a negative effect on system performance. (See System Administration Guide: Basic Administration OPTIONS
The following options are supported: -c class Specifies the class whose parameters are to be displayed or changed. Valid class values are: RT for the real-time class, TS for the time-sharing class, IA for the inter-active class, FSS for the fair-share class, and FX for the fixed-priority class. The time-sharing and inter-active classes share the same scheduler, so changes to the scheduling parameters of one will change those of the other. -d [class] Sets or displays the name of the default scheduling class to be used on reboot by the startup script /etc/init.d/sysetup. If class name is not specified, the name and description of the current default scheduling class is displayed. If class name is specified and is a valid scheduling class name, then it is saved in dispadmin's private configuration file /etc/dispadmin.conf. Only super-users can set the default scheduling class. -g Gets the parameters for the specified class and writes them to the standard output. Parameters for the real-time class are described in rt_dptbl(4). Parameters for the time-sharing and inter-active classes are described in ts_dptbl(4). Parameters for the fair-share class are described in FSS(7). Parameters for the fixed-priority class are described in fx_dptbl(4). The -g and -s options are mutually exclusive: you may not retrieve the table at the same time you are overwriting it. -l Lists the scheduler classes currently configured in the system. -r res When using the -g option you may also use the -r option to specify a resolution to be used for outputting the time quantum values. If no resolution is specified, time quantum values are in milliseconds. If res is specified it must be a positive integer between 1 and 1000000000 inclusive, and the resolution used is the reciprocal of res in seconds. For example, a res value of 10 yields time quantum values expressed in tenths of a second; a res value of 1000000 yields time quantum values expressed in microseconds. If the time quantum cannot be expressed as an integer in the specified resolution, it is rounded up to the next integral multiple of the specified resolution. -s file Sets scheduler parameters for the specified class using the values in file. These values overwrite the current values in memory--they become the parameters that control scheduling of processes in the specified class. The values in file must be in the format output by the -g option. Moreover, the values must describe a table that is the same size (has same number of priority levels) as the table being overwritten. Super-user privileges are required in order to use the -s option. Specify time quantum values for scheduling classes in system clock ticks, and not in constant-time units. Time quantum values are based on the value of the kernel's hz variable. If kernel variable hires_tick is set to 1 to get higher resolu- tion clock behavior, the actual time quanta will be reduced by the order of 10. The -g and -s options are mutually exclusive: you may not retrieve the table at the same time you are overwriting it. EXAMPLES
Example 1: Retrieving the Current Scheduler Parameters for the real-time class The following command retrieves the current scheduler parameters for the real-time class from kernel memory and writes them to the standard output. Time quantum values are in microseconds. dispadmin -c RT -g -r 1000000 Example 2: Overwriting the Current Scheduler Parameters for the Real-time Class The following command overwrites the current scheduler parameters for the real-time class with the values specified in rt.config. dispadmin -c RT -s rt.config Example 3: Retrieving the Current Scheduler Parameters for the Time-sharing Class The following command retrieves the current scheduler parameters for the time-sharing class from kernel memory and writes them to the stan- dard output. Time quantum values are in nanoseconds. dispadmin -c TS -g -r 1000000000 Example 4: Overwriting the Current Scheduler Parameters for the Time-sharing Class The following command overwrites the current scheduler parameters for the time-sharing class with the values specified in ts.config. dispadmin -c TS -s ts.config FILES
/etc/dispadmin.conf ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
priocntl(1), priocntl(2), fx_dptbl(4), rt_dptbl(4), ts_dptbl(4), attributes(5), FSS(7) System Administration Guide: Basic Administration Programming Interfaces Guide DIAGNOSTICS
dispadmin prints an appropriate diagnostic message if it fails to overwrite the current scheduler parameters due to lack of required per- missions or a problem with the specified input file. SunOS 5.10 7 Oct 2002 dispadmin(1M)
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy