fish: Use full format listing for ps
Using ps -e is not that helpful since it does not show the full command line which is what is helpful in filtering and distinguishing between multiple processes. For eg. we might have multiple processes running using python and to distinguish between them we need the full command line invocation.
This commit is contained in:
parent
a7b12dc642
commit
61e617e494
1 changed files with 5 additions and 5 deletions
|
@ -349,11 +349,11 @@ function dotg --description "Generate gstreamer dot graph for selected file"
|
||||||
end
|
end
|
||||||
|
|
||||||
function gdba --description "Attach to a process"
|
function gdba --description "Attach to a process"
|
||||||
gdb attach -p (ps -e | fzf | awk '{print $1}' | head -1)
|
gdb attach -p (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gdbp --description "Attach to a python process"
|
function gdbp --description "Attach to a python process"
|
||||||
gdb python3 (ps -e | fzf | awk '{print $1}' | head -1)
|
gdb python3 (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gdbr --description "Start a command/process with rust-gdb"
|
function gdbr --description "Start a command/process with rust-gdb"
|
||||||
|
@ -361,7 +361,7 @@ function gdbr --description "Start a command/process with rust-gdb"
|
||||||
end
|
end
|
||||||
|
|
||||||
function pst --description "Show process tree of a process"
|
function pst --description "Show process tree of a process"
|
||||||
set proc (ps -e | fzf | awk '{print $1}' | head -1)
|
set proc (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||||
pstree -H $proc $proc
|
pstree -H $proc $proc
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -380,12 +380,12 @@ function cdG --description "Select a coredump to run coredumpctl gdb"
|
||||||
end
|
end
|
||||||
|
|
||||||
function pft --description "Select a process to run perf top"
|
function pft --description "Select a process to run perf top"
|
||||||
set proc (ps -e | fzf | awk '{print $1}')
|
set proc (ps -ef | fzf | awk '{print $2}')
|
||||||
perf top -p $proc
|
perf top -p $proc
|
||||||
end
|
end
|
||||||
|
|
||||||
function pfr --description "Select a process to record performance data in given file name"
|
function pfr --description "Select a process to record performance data in given file name"
|
||||||
set proc (ps -e | fzf | awk '{print $1}')
|
set proc (ps -ef | fzf | awk '{print $2}')
|
||||||
perf record -F 99 -o $argv -p $proc
|
perf record -F 99 -o $argv -p $proc
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue