Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
75ae9689
Unverified
Commit
75ae9689
authored
Dec 08, 2024
by
Yineng Zhang
Committed by
GitHub
Dec 08, 2024
Browse files
minor: update killall script (#2391)
parent
95f93f49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
python/sglang/utils.py
python/sglang/utils.py
+1
-1
scripts/killall_sglang.sh
scripts/killall_sglang.sh
+13
-4
No files found.
python/sglang/utils.py
View file @
75ae9689
"""Common utilities
.
"""
"""Common utilities"""
import
base64
import
gc
...
...
scripts/killall_sglang.sh
View file @
75ae9689
#
Kill all SGLang processes and free the GPU memory.
#
!/bin/bash
kill
-9
$(
ps aux |
grep
'multiprocessing.spawn'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
kill
-9
$(
ps aux |
grep
'sglang.launch_server'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
kill
-9
$(
ps aux |
grep
'sglang.bench'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
# Show current GPU status
nvidia-smi
# Clean SGLang processes
kill
-9
$(
ps aux |
grep
'multiprocessing.spawn'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
2>/dev/null
kill
-9
$(
ps aux |
grep
'sglang.launch_server'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
2>/dev/null
kill
-9
$(
ps aux |
grep
'sglang.bench'
|
grep
-v
'grep'
|
awk
'{print $2}'
)
2>/dev/null
# Clean all GPU processes if any argument is provided
if
[
$#
-gt
0
]
;
then
kill
-9
$(
nvidia-smi |
sed
-n
'/Processes:/,$p'
|
grep
" [0-9]"
|
awk
'{print $5}'
)
2>/dev/null
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment