Sponsored Content
Operating Systems OS X (Apple) Terminal autorunning commands at start Post 302547222 by randomtypos on Sunday 14th of August 2011 09:11:20 PM
Old 08-14-2011
Terminal autorunning commands at start

How do I make terminal autorun commands at start up? For example, I have several windows of terminal, I want one to automatically run 'top' and a couple others autorun 'man' pages.

Is there any way I can do this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start process in shellscript at other terminal

A programming running in tty0 crashes. In a second terminal I kill all the processes. Can i start the program again from this terminal? Yes, I can, but it starts in tty1, and when i close the terminal, the program closes. Now I want to start the program from tty1 in tty0, so i can close... (4 Replies)
Discussion started by: benschell
4 Replies

2. UNIX for Dummies Questions & Answers

Run the start script from the terminal? Newbie Time!

Hi, How do I "run a script"? I'm trying to start up some software called ElectroServer 3, and was told I just needed to "run the start script from the terminal to get things going". From the terminal, i use cd command to change to the software's directory, and I guess the script in question is... (4 Replies)
Discussion started by: waking_bear
4 Replies

3. UNIX for Dummies Questions & Answers

Terminal doesnt start

Hi everyone, I'm pretty new using UNIX, but a friend of mine was helping me configure the unix terminal on my mac, and he changed some stuff on the bash profile .bash_profile. Everything was going well until I shut my computer and restarted it. When I opened the terminal this time this is what... (1 Reply)
Discussion started by: thefloydpink
1 Replies

4. IP Networking

start a new terminal from a script after opening VPN

Hi all, I am trying to write a script that launch the cisco vpn client from the command line and then connects to a remote host using ssh. When i connect to the cisco vpn using vpnclient client connect the last lines of output from that client is Encryption: 168-bit 3-DES Authentication:... (0 Replies)
Discussion started by: borderblaster
0 Replies

5. Shell Programming and Scripting

how to start SCRIPT command at begin of TERMINAL?

Hello sir, I want to monitor my work on the terminal.I know we can use script command.But every time when I start the terminal, I have to type script to start it.I want to automate it. So where should I include this command so that it will start as soon as I start the terminal ???? (2 Replies)
Discussion started by: nsharath
2 Replies

6. Solaris

Start process independent from TERMINAL (or also with PPID 1)

Hi *, please, I need fast tip (help). I have a process starting through /etc/rc3.d/xxxx script. However, sometimes (mostly because of testing reasons) I need to stop the process, change something and then start it again. But: 1) when I start it in terminal, the process dies when I leave the... (2 Replies)
Discussion started by: freeangel
2 Replies

7. OS X (Apple)

How to start a new terminal from command line?

Dear All, Anyone knows how to start a new bash terminal from command line? Another question: when I use "open" command (open test.pdf) to open a pdf file, the PDF reader will start up, but cannot associate with that file. Anyone knows why? (1 Reply)
Discussion started by: andrewust
1 Replies

8. Shell Programming and Scripting

Put Script on Start-up the sh Terminal

Hi all I want to put this script on start-up the sh Terminal to save history of output: if ; then logdir=$HOME/terminal-logs if ; then mkdir $logdir fi gzip -q $logdir/*.log logfile=$logdir/$(date +%F_%T).$$.log ... (12 Replies)
Discussion started by: Rahim_T
12 Replies

9. Windows & DOS: Issues & Discussions

Start X Server without starting a terminal

when I run C:\cygwin\bin\run C:\cygwin\bin\startxwin.exe it fires up a terminal by default. Can I eliminate that terminal and start the x server as a service silently and sits in my status bar just there? Thanks Jack (0 Replies)
Discussion started by: lucky7456969
0 Replies

10. AIX

Process on a specified Terminal and Socket Port does not start

Hi, I new to AIX, and I have been using Rocket UniData in it. I had to set up a Process for Data Exchange by assigning a unique Terminal and a Socket Port to that process. I ran the process for the first time and it was successful and after use I stopped the process. Now when I want to run it... (3 Replies)
Discussion started by: BejoyS
3 Replies
cmeval(1m)																cmeval(1m)

NAME
cmeval - evaluate the impact of Serviceguard configuration and state changes on the packages SYNOPSIS
[-v] output_file] input_file DESCRIPTION
is a "what if" analysis tool that evaluates the effect of configuration and state changes on Serviceguard packages. Combinations of pack- ages usually have numerous constraints, such as co-existence or mutual exclusion, amongst others; and allows one to evaluate the possible impact under various "what if" scenarios of Serviceguard specific events. accepts input from a file containing the machine parsable output of the command specifying the whole cluster configuration that needs to be evaluated. If the root user invokes the command, the input file must be owned by root and be writable only by root. The -v option displays verbose output. Without the -v option, only the final states of the packages are displayed. With the -v option, the intermediate states of the packages are also displayed. The command performs limited validation on the input file before feeding the data for evaluation. Since this command is intended for expert users, it is user's responsibility to provide the data input in a syntactically correct order. The behavior of the program is unspecified (including the exit codes) when the syntax is unexpected. The best way to determine the syntax is to look at the output of or to read the man page. can safely be used in a production environment without affecting the current state of the cluster or packages. The command doesn't execute the package run/halt scripts so the failures encountered by those scripts are not taken into account while generating the output file. One need not be logged in to the cluster being evaluated in order to run the evaluations, but is only supported when running on the same release/patch version as the cluster whose data is being evaluated. Reports can be generated offline. doesn't support package in mainte- nance mode. If the information of package in maintenance mode in the cmviewcl line output is modified, the prediction might not be accu- rate. Options supports the following options: The output file contains the list of affected packages and is designed for simple machine parsing using tools such as grep(1), cut(1), or awk(1). By default, the output of this command will go to the stdout. The output file will be empty if there are no affected packages for the simulated events. The information contains the following parameters: Name of the affected package Name of the node where effect takes place New state the package will transition to Each line of output is in the form: The possible action values are : failwait, relocate_wait, starting, down, and failing. Please refer cmviewcl(5) manpage for the meaning of the states. input_file The input file contains the output of command for the configuration/state changes that are to be evaluated. -v Verbose output will be displayed. This option provides intermediate actions associated with the state changes on Serviceguard pack- ages. The following table illustrates the mappings for the supported configuration events with a two node/two package cluster example in mind. A combination of these events can be evaluated simultaneously. The events include the actual commands for comparision. Although the actual commands would check that the input is valid before executing, and might not execute, or might fail, under some conditions, does not per- form these validations and will always execute. ------------------------------------------------------------------------------ Event How to Simulate the Example Segment From an Output Event Using File cmviewcl Line Output? ------------------------------------------------------------------------------ Cluster member Change specific node:node1|status=up node1 start up node status to up package:pkg1|node:node1|avail- cmrunnode -t and node availabil- able=yes node1) ity to yes for each package:pkg2|node:node1|avail- package configured able=yes to run on the node. ------------------------------------------------------------------------------ Cluster member Change specific node:node1|status=down node1 shutdown/ node status to down package:pkg1|node:node1|available=no failure and node availabil- package:pkg2|node:node1|available=no (cmhaltnode -t ity to no for each node1) package configured to run on the node. ------------------------------------------------------------------------------ Cluster bring up Change node status node:node1|status=up (cmruncl -t) to up and node node:node2|status=up availability to yes package:pkg1|autorun=enable for each package package:pkg1|node:node1|avail- configured to run able=yes on the cluster mem- package:pkg1|node:node2|avail- ber nodes. Make able=yes sure that all pack- package:pkg2|autorun=enable ages autorun flag package:pkg2|node:node1|avail- is enabled. able=yes package:pkg2|node:node2|avail- able=yes ------------------------------------------------------------------------------ Enable package Change package package:pkg1|autorun=enabled pkg1 switching autorun flag to package:pkg1|node:node1|avail- (cmmodpkg -t -e enabled and the able=yes pkg1) desired (usually package:pkg1|node:node2|avail- all) node avail- able=yes ability to yes. ------------------------------------------------------------------------------ Enable package Change package node package:pkg1|node:node1|avail- pkg1 node availability to able=yes switching yes. (cmmodpkg -t -n n1 -e pkg1) ------------------------------------------------------------------------------ Package pkg1 Change package package:pkg1|autorun=enabled startup on a autorun flag to package:pkg1|node:node1|avail- viable node enabled and all the able=yes {cmrunkpg -t -a node availability package:pkg1|node:node2|avail- pkg1) to yes. able=yes ------------------------------------------------------------------------------ Package pkg1 Change package package:pkg1|autorun=enabled startup on node1 autorun flag to package:pkg1|node:node1|avail- (cmrunpkg -t -n enabled, the spe- able=yes node1 pkg1) cific node avail- package:pkg1|node:node2|available=no ability to yes and all other node availability to no. ------------------------------------------------------------------------------ Package pkg1 Change package package:pkg1|autorun=enabled startup on local autorun flag to package:pkg1|node:node1|avail- node (cmrunpkg enabled, the local able=yes -t pkg1) node availability package:pkg1|node:node2|available=no to yes and all other node avail- ability to no. ------------------------------------------------------------------------------ Package pkg1 Change package package:pkg1|autorun=disabled shutdown/ fail- autorun flag to package:pkg1|node:node1|available=no ure (cmhaltpkg disabled and the -t pkg1 or package owner node cmhaltpkg -t -n availability to no node1 pkg1) ------------------------------------------------------------------------------ Package pkg1 Change node avail- package:pkg1|autorun=enabled migration from ability for all the package:pkg1|node:node1|available=no one node1 to configured nodes to package:pkg1|node:node2|avail- node2 no except for the able=yes node where package needs to move to yes. Make sure that the autorun is enabled. ------------------------------------------------------------------------------ Package pkg1 and Set the priority to package:pkg1|priority=10 pkg2 priority the desired number package:pkg2|priority=20 change ------------------------------------------------------------------------------ Package pkg1 Set the node order package:pkg1|node:node1|order=2 node order to the desired num- package:pkg1|node:node2|order=1 change ber ------------------------------------------------------------------------------ Subnet, EMS or Change the node package:pkg1|node:node1|available=no Storage unavail- availability to no package:pkg2|node:node2|available=no ability on node1 for each package configured to run on that node ------------------------------------------------------------------------------ Add/change Add/change capacity node:node1|capacity:memory|name=mem- capacity named name and limit ory node:node1|capacity:mem- "memory" for ory|limit=10000 node node1 ------------------------------------------------------------------------------ Add/change pack- Add/change weight weight_default:memory|name=memory age weight default name and weight_default:memory|value=10 default named value "memory" for all packages ------------------------------------------------------------------------------ Add/change Add/change weight package:pkg1|weight:memory|name=mem- weight named name and value ory "memory" for package:pkg1|weight:memory|value=20 package pkg1 ------------------------------------------------------------------------------ RETURN VALUE
returns the following value: 0 Successful completion. 1 Command failed with a syntax error or inaccuracies in the input file. EXAMPLES
To evaluate the impact of a node bring-up on two packages with a configured dependency and failback policy set to automatic:(1) Obtain an existing cluster configuration using command. NOTE: In the existing configuration, is running on an alternate node, as the primary node is not available. The failback policy is set to automatic. This means that when is eligible to run it, will automatically fail back to is running on its primary node. How- ever, it depends on pkg1 (which has the higher priority setting of 2719) with a same node dependency. This means when pkg1 fails back to its primary node, will be dragged along with pkg1 to run on the same node as node:node1|name=node1 node:node1|status=down : : node:node2|name=node2 node:node2|status=up : : package:pkg1|name=pkg1 package:pkg1|type=failover package:pkg1|status=up package:pkg1|state=running package:pkg1|autorun=enabled package:pkg1|owner=node2 package:pkg1|id=3200 package:pkg1|initial_autorun=enabled package:pkg1|failover_policy=configured_node package:pkg1|failback_policy=automatic package:pkg1|priority=2719 : : package:pkg1|node:node1|name=node1 package:pkg1|node:node1|status=down package:pkg1|node:node1|switching=enabled package:pkg1|node:node1|available=no package:pkg1|node:node1|type=Primary package:pkg1|node:node1|order=1 : : package:pkg1|node:node2|name=node2 package:pkg1|node:node2|status=up package:pkg1|node:node2|switching=enabled package:pkg1|node:node2|available=yes package:pkg1|node:node2|type=Alternate package:pkg1|node:node2|order=2 : : package:pkg2|name=pkg1 package:pkg2|type=failover package:pkg2|status=up package:pkg2|state=running package:pkg2|autorun=enabled package:pkg2|owner=node2 package:pkg2|id=3201 package:pkg2|initial_autorun=enabled package:pkg2|failover_policy=configured_node package:pkg2|failback_policy=manual package:pkg2|node:node1|order=1 package:pkg2|priority=no_priority : : package:pkg2|node:node2|name=node2 package:pkg2|node:node2|status=up package:pkg2|node:node2|switching=enabled package:pkg2|node:node2|available=yes package:pkg2|node:node2|type=Primary package:pkg2|node:node2|order=1 : : package:pkg2|node:node1|name=node1 package:pkg2|node:node1|status=down package:pkg2|node:node1|switching=enabled package:pkg2|node:node1|available=no package:pkg2|node:node1|type=Alternate package:pkg2|dependency:pkg1|node:spanish|satisfied=yes(2) Modify the configuration file to simulate the event node:node1|status=up package:pkg1|node:node1|available=yes package:pkg2|node:node1|available=yes package:pkg2|node:node1|available=yes(3) Invoke to simulate the event. The output will show the effect of the node1 bring-up . package:pkg1|node:node2|action=failing package:pkg2|node:node2|action=failing package:pkg1|node:node1|action=starting package:pkg2|node:node1|action=starting(4) Invoke to simulate the event. The output will show the end effect of the node1 bring-up. package:pkg1|node:node1|action=starting package:pkg2|node:node1|action=starting AUTHOR
was developed by HP. SEE ALSO
cmhaltnode(1M), cmhaltpkg(1M), cmmodpkg(1M), cmrunnode(1M), cmrunpkg(1M), cmruncl(1M), cmviewcl(1M). Requires Optional Serviceguard Software cmeval(1m)
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy