mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(change version)
added filter, only 5 or less allowed in irc client, terminal 20 or less supported.
This commit is contained in:
parent
929bf70fb9
commit
664bee7689
11
inxi
11
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.4.0
|
||||
#### version: 1.4.1
|
||||
#### Date: February 12 2010
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -1263,8 +1263,8 @@ show_options()
|
|||
print_screen_output "-s Show sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detected fan speeds."
|
||||
print_screen_output " Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens."
|
||||
print_screen_output "-S Show System information: host name, kernel, distro"
|
||||
print_screen_output "-t Show processes. Requires extra options: c (cpu) m (memory) cm (cpu+memory). If followed"
|
||||
print_screen_output " by numbers 1-20, shows that number of top process for each selection (default: $PS_COUNT): -t cm10"
|
||||
print_screen_output "-t Show processes. Requires extra options: c (cpu) m (memory) cm (cpu+memory). If followed by numbers 1-20,"
|
||||
print_screen_output " shows that number of processes for each type (default: $PS_COUNT; if in irc, max: 5): -t cm10"
|
||||
print_screen_output " Make sure to have no space between letters and numbers (-t cm10 -right, -t cm 10 -wrong)."
|
||||
print_screen_output "-u Show partition UUIDs. Default: short partition -P. For full -p output, use: -pu (or -plu)."
|
||||
print_screen_output "-v Script verbosity levels. Verbosity level number is required."
|
||||
|
@ -3203,6 +3203,11 @@ get_ps_data()
|
|||
{
|
||||
eval $LOGFS
|
||||
local array_length='' reorder_temp='' i=0
|
||||
|
||||
# throttle potential irc abuse
|
||||
if [[ $B_RUNNING_IN_SHELL != 'true' && $PS_COUNT -gt 5 ]];then
|
||||
PS_COUNT=5
|
||||
fi
|
||||
IFS=$'\n'
|
||||
# note that inxi can use a lot of cpu, and can actually show up here as the script runs
|
||||
A_PS_DATA=( $( ps aux --sort $1 | grep -v 'inxi' | tail -n $PS_COUNT | gawk '
|
||||
|
|
Loading…
Reference in a new issue