Sponsored Content
Operating Systems AIX Cmd to find CPU utiliz of a process in AIX Post 302197154 by andryk on Tuesday 20th of May 2008 09:07:36 AM
Old 05-20-2008
Hi,
WLM or work load manager might be the right tool you're looking for, did not really remember the few steps to set it up but just google for it, its worth a try ... Smilie
 

10 More Discussions You Might Find Interesting

1. Solaris

How to find which process is using up too much CPU

Hi, I need to find which processes are hogging the cpu up. please advise. Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. AIX

Find CPU per process in AIX

Hi. I am looking for a command that will return me the amount of CPU used by a specific process in AIX environment. I know there is TOPAS - but it is interactive and I need to get this information from system that connects remotely via SSH. Using writing to files and than reading them is also... (1 Reply)
Discussion started by: yamsin789
1 Replies

4. Programming

C++ application: how to access AIX process and cpu information?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (0 Replies)
Discussion started by: DarthVader77
0 Replies

5. AIX

How to access process and cpu info on AIX?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies

6. UNIX for Advanced & Expert Users

How to find out memory & cpu usage of a process

Hi, By using time command we can determine the execution time of a process or command. bash-2.04$ time ls -l total 0 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file1 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file2 real 0m0.002s user 0m0.000s sys 0m0.001s... (5 Replies)
Discussion started by: learn more
5 Replies

7. AIX

How to find what process is using a port in AIX 5L and above.

There have been a lot of threads about how to find processes that are using a specific port on an AIX server. After long hours of research and reading countless "you can't do that" responses, I finally found the answer. YES IT CAN BE DONE! YES ITS EASY. NO, I DON'T KNOW WHY NO ONE GETS THIS... (2 Replies)
Discussion started by: troym72
2 Replies

8. AIX

Aix process CPU differences.

Hi, I'm trying to create a script to catch a process which is consuming high CPU which I have pretty much done but it's just finding the correct place to pull the current CPU for that process. When viewed in Topas it's consuming 99.*% cpu But if I try using ps avg or ps -eo pcpu ... (5 Replies)
Discussion started by: elmesy
5 Replies

9. Shell Programming and Scripting

Cpu utilization by a process has to be mailed if more than 5% on AIX

i am using the below command in order to find the cpu utilization by a user..now i want to mail if the cpu utilization goes beyond 5%....can someone please help me ? ps auxw | sort -r +2 | awk '{ print $3,$1 }' | head -6 | egrep "USER|#anonymous#" %CPU USER 2.0 anonymous Regards,... (6 Replies)
Discussion started by: arorap
6 Replies

10. Shell Programming and Scripting

Tricky situation with process cpu usage - AIX

OS: AIX so we frequently receive a lot of cpu related alerts. all types of checks have been created to keep an eye on the cpu but a lot of these checks make too much noise as the CPU is always being seen as high. the system and application owners say there's no issue with the cpu. so now,... (6 Replies)
Discussion started by: SkySmart
6 Replies
App::Cmd(3pm)						User Contributed Perl Documentation					     App::Cmd(3pm)

NAME
App::Cmd - write command line apps with less suffering VERSION
version 0.318 SYNOPSIS
in yourcmd: use YourApp; YourApp->run; in YourApp.pm: package YourApp; use App::Cmd::Setup -app; 1; in YourApp/Command/blort.pm: package YourApp::Command::blort; use YourApp -command; use strict; use warnings; sub opt_spec { return ( [ "blortex|X", "use the blortex algorithm" ], [ "recheck|r", "recheck all results" ], ); } sub validate_args { my ($self, $opt, $args) = @_; # no args allowed but options! $self->usage_error("No args allowed") if @$args; } sub execute { my ($self, $opt, $args) = @_; my $result = $opt->{blortex} ? blortex() : blort(); recheck($result) if $opt->{recheck}; print $result; } and, finally, at the command line: knight!rjbs$ yourcmd blort --recheck All blorts successful. DESCRIPTION
App::Cmd is intended to make it easy to write complex command-line applications without having to think about most of the annoying things usually involved. For information on how to start using App::Cmd, see App::Cmd::Tutorial. METHODS
new my $cmd = App::Cmd->new(\%arg); This method returns a new App::Cmd object. During initialization, command plugins will be loaded. Valid arguments are: no_commands_plugin - if true, the command list plugin is not added no_help_plugin - if true, the help plugin is not added plugin_search_path - The path to search for commands in. Defaults to results of plugin_search_path method If "no_commands_plugin" is not given, App::Cmd::Command::commands will be required, and it will be registered to handle all of its command names not handled by other plugins. If "no_help_plugin" is not given, App::Cmd::Command::help will be required, and it will be registered to handle all of its command names not handled by other plugins. Note: "help" is the default command, so if you do not load the default help plugin, you should provide your own or override the "default_command" method. run $cmd->run; This method runs the application. If called the class, it will instantiate a new App::Cmd object to run. It determines the requested command (generally by consuming the first command-line argument), finds the plugin to handle that command, parses the remaining arguments according to that plugin's rules, and runs the plugin. It passes the contents of the global argument array (@ARGV) to ""prepare_command"", but @ARGV is not altered by running an App::Cmd. prepare_args Normally App::Cmd uses @ARGV for its commandline arguments. You can override this method to change that behavior for testing or otherwise. default_args If "prepare_args" is not changed and there are no arguments in @ARGV, this method is called and should return an arrayref to be used as the arguments to the program. By default, it returns an empty arrayref. arg0 full_arg0 my $program_name = $app->arg0; my $full_program_name = $app->full_arg0; These methods return the name of the program invoked to run this application. This is determined by inspecting $0 when the App::Cmd object is instantiated, so it's probably correct, but doing weird things with App::Cmd could lead to weird values from these methods. If the program was run like this: knight!rjbs$ ~/bin/rpg dice 3d6 Then the methods return: arg0 - rpg full_arg0 - /Users/rjbs/bin/rpg These values are captured when the App::Cmd object is created, so it is safe to assign to $0 later. prepare_command my ($cmd, $opt, @args) = $app->prepare_command(@ARGV); This method will load the plugin for the requested command, use its options to parse the command line arguments, and eventually return everything necessary to actually execute the command. default_command This method returns the name of the command to run if none is given on the command line. The default default is "help" execute_command $app->execute_command($cmd, \%opt, @args); This method will invoke "validate_args" and then "run" on $cmd. plugin_search_path This method returns the plugin_search_path as set. The default implementation, if called on "YourApp::Cmd" will return "YourApp::Cmd::Command" This is a method because it's fun to override it with, for example: use constant plugin_search_path => __PACKAGE__; allow_any_unambiguous_abbrev If this method returns true (which, by default, it does not), then any unambiguous abbreviation for a registered command name will be allowed as a means to use that command. For example, given the following commands: reticulate reload rasterize Then the user could use "ret" for "reticulate" or "ra" for "rasterize" and so on. global_options if ($cmd->app->global_options->{verbose}) { ... } This method returns the running application's global options as a hashref. If there are no options specified, an empty hashref is returned. set_global_options $app->set_global_options(\%opt); This method sets the global options. command_names my @names = $cmd->command_names; This returns the commands names which the App::Cmd object will handle. command_plugins my @plugins = $cmd->command_plugins; This method returns the package names of the plugins that implement the App::Cmd object's commands. plugin_for my $plugin = $cmd->plugin_for($command); This method returns the plugin (module) for the given command. If no plugin implements the command, it returns false. get_command my ($command_name, $opt, @args) = $app->get_command(@args); Process arguments and into a command name and (optional) global options. usage print $self->app->usage->text; Returns the usage object for the global options. usage_desc The top level usage line. Looks something like "yourapp [options] <command>" global_opt_spec Returns an empty list. Can be overridden for pre-dispatch option processing. This is useful for flags like --verbose. usage_error $self->usage_error("Something's wrong!"); Used to die with nice usage output, during "validate_args". TODO
o publish and bring in Log::Speak (simple quiet/verbose output) o publish and use our internal enhanced describe_options o publish and use our improved simple input routines AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-05-05 App::Cmd(3pm)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy