Sponsored Content
Operating Systems HP-UX echo "selall;info;wait;infolog" | /usr/sbin/cstm problem Post 302519510 by methyl on Wednesday 4th of May 2011 07:47:25 AM
Old 05-04-2011
This is a scripting error and not a cstm error.
On my system the cstm command posted outputs more than 3000 words, and you are dumping the entire formatted output from cstm into an environment variable called $CSTM. Quite easy to exceed the maximum size allowed in "echo" on older systems.
What Shell are you using?
Code:
echo $SHELL

No idea what $_echo is about in your script.

I think we can simplify the script down to:
Code:
HIT_COUNT=`echo "selall;info;wait;infolog" | /usr/sbin/cstm | grep -c "(SelAll) is currently disabled."`
if [ ${HIT_COUNT} -gt 0 ]; then
echo "HIT_COUNT is ${HIT_COUNT}"
fi


By the way I've never seen this exact string in a cstm report:
Quote:
"(SelAll) is currently disabled."
 

10 More Discussions You Might Find Interesting

1. Solaris

difference between "root" and "usr" packages

Hi, could someone pls enlighten me on the difference between the "root" package and "usr" package? Like in this example: pkginfo -l SUNWGtku | grep -i desc DESC: GTK - The GIMP Toolkit (Usr) and pkginfo -l SUNWGtkr | grep -i desc DESC: GTK - The GIMP Toolkit (Root)... (6 Replies)
Discussion started by: masloff
6 Replies

2. Shell Programming and Scripting

calling a shell script in background and wait using "wait" in while loop

Hi, I am facing a strange issue, when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed. cat abc.txt | while read -u4 line do #if line contains #... (2 Replies)
Discussion started by: mihirvora16
2 Replies

3. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

4. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

5. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

6. Shell Programming and Scripting

About reture with string and keep other "echo" info

I use below code to get ip, and I want to echo something in the function, but the $IP will be all the value from "echo" I just want to get the real ip, and keep the echo info, any help #!/bin/bash get_ip() { ip=$(grep -B2 "00:01:02:03:04:05" ip_tmp.log |head -1 |awk '{print $2}') ... (4 Replies)
Discussion started by: yanglei_fage
4 Replies

7. Shell Programming and Scripting

If cmd in in "A/user/bin A/bin A/user/sbin" but not "B/user/bin B/bin B/user/sbin" directory print t

there are two directories A and B if cmd in in "A/user/bin A/bin A/user/sbin" but not "B/user/bin B/bin B/user/sbin" directory print them (1 Reply)
Discussion started by: yanglei_fage
1 Replies

8. UNIX for Advanced & Expert Users

AIX - io info get from "libperfstat" not match "iostat"

Hi, everyone. I need to write a program to get io info based on libperfstat. But the "write time" of a disk is just half of the value get from iostat. I'm confused and can't explain. Help please. How I calculate "write service time per sec": In iostat: write service... (0 Replies)
Discussion started by: jackliang
0 Replies

9. Red Hat

"/usr/sbin/hpacucli ctrl all show" command does not work

Dear Concern, We have observed that following command stuck/does not work in some RedHat nodes. Please advise us to troubleshoot the issue. /usr/sbin/hpacucli ctrl all show Note: HP Array Configuration Utility CLI for Linux 64-bit With Best Regards, Md. Abdullah-Al Kauser (3 Replies)
Discussion started by: makauser
3 Replies

10. Shell Programming and Scripting

Mindboggling difference between using "tee" and "/usr/bin/tee" in bash

I'm on Ubuntu 14.04 and I manually updated my coreutils so that "tee" is now on version 8.27 I was running a script using bash where there is some write to pipe error at some point causing the tee command to exit abruptly while the script continues to run. The newer version of tee seems to prevent... (2 Replies)
Discussion started by: stompadon
2 Replies
STM(1M) 																   STM(1M)

NAME
stm, xstm, mstm, cstm - Support Tools Manager SYNOPSIS
/usr/bin/stm [-x|-m|-c] [-f command_file] /usr/sbin/xstm [-f command_file] /usr/sbin/mstm [-f command_file] /usr/sbin/cstm [-f command_file] DESCRIPTION
The Support Tools Manager (STM) provides three interfaces that allow a user access to an underlying toolset, consisting of information mod- ules, firmware update tools, verifiers, diagnostics, exercisers, expert tools, and utilities: XSTM - the graphical interface (for X11-based graphics terminals) MSTM - the menu-based interface (for non-X11-based, non-graphics terminals) CSTM - the command line interface (for running scripts) Which interface you choose will depend upon your needs, preferences, and resources as a user. If STM is run and [-x|-m|-c] is not specified, then: If the "DISPLAY" environment variable is set, XSTM is run. If the "DISPLAY" environment variable is not set, MSTM is run. Application Usage This tool will be deprecated on new server models. Please use System Management Homepage (see hpsmh(1M)). OPTIONS
-x The XSTM program is the X-Windows interface for the Support Tools Manager (STM). It allows you to access and run various support tools (information modules, firmware update tools, verifiers, diagnostics, exercisers, and utilities, depending upon your level of licensing privilege) on one or more PA-RISC machines. You can run XSTM on one machine, and use it to run support tools on one or more remote machines (Units Under Test, or UUTs). Alterna- tively, you can run XSTM on one machine, and use it to run support tools on the same machine (i.e., the machine running XSTM and the UUT are one and the same). The basic principle of XSTM usage is that you see a display of the legacy devices configured on the UUT (the legacy system map, or legacy device map) when you first run the interface. Alternatively, display of the agile devices configured on the UUT (the agile system map, or agile device map) can be seen by selecting the "View Agile Map" option in the "System" menu. For information about legacy devices and agile devices see intro(7) manpage. By clicking on one or more icons representing the device(s) you want to test, or whose logs you want to view, and using the appropriate pulldown and popup menus, you can test your system to see if it is functioning properly. Any problems with your system will be reflected by color changes to the icons in the device map (e.g., red for "Failure"), in its legacy view or agile view or both the views (if a device is represented in both the views, the color change will be reflected in both of them). By viewing the corresponding log (e.g. the Failure Log), you can then determine the appropriate corrective action to take. Use the Help pulldown menu to access the online help system. -m The MSTM program is the menu interface for the Support Tools Manager (STM). It provides the same functionality as XSTM described above. The device map is a list of devices on the Unit Under Test (UUT). You select devices by moving the cursor with the up and down arrow keys to the line entry for the desired device(s). You issue commands by means of function keys. Any problems with your system will be reflected by changes in the "Last Op Status" column of the device map. By viewing the corresponding log (e.g. the Failure Log), you can then determine the appropriate corrective action to take. Press the help function key to access the online help system. -c The CSTM program is the command line interface for the Support Tools Manager (STM). It provides the same functionality as XSTM described above. Entering the command "map" displays a list of legacy devices (the legacy device map) on the Unit Under Test (UUT). Entering the command "amap" displays a list of agile devices (the aglie device map) on the Unit Under Test (UUT). You select devices by entering the hardware path or device number for the desired device(s); use the command "select path" or "select device". Any problems with your system will be reflected by error, warning, or caution messages displayed by the system. By viewing the corresponding log (e.g. the Failure Log), you can then determine the appropriate corrective action to take. Entering the command "help" displays a summary of the cstm commands; the command "help all" gives you full access to the online help system. -f command_file The "-f" option allows the user to specify a CSTM command file to run prior to bringing up the selected User Interface. Multiple "-f com- mand_file" options can be provided and the command files will be processed from left to right. HELP
Topics available are: On Item has context-sensitive information on specific help topics (XSTM only). On Tasks has cookbook procedures for performing common system tasks using STM. On Application has general information about the Support Tool Manager. On Help has information about the HPHelp product. On Version displays a banner with copyright, version, and legal information about STM. OTHER FILES
/usr/sbin/stm/ui/config/.stmrc - stm startup script. /usr/sbin/stm/ui/config/saveconfig.cmd - stm config save command file. ENVIRONMENT
DISPLAY If you are using X Windows, you must be set to the desired X Windows display ID (e.g., local:0.0). COPYRIGHT
(c) Copyright 1995-6, Hewlett-Packard Company ORIGIN
STM was developed by Hewlett-Packard Company. SEE ALSO
intro(7), diagmond(1M) STM(1M)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy