Article 5P310 cpu loop

cpu loop

by
vucni45
from LinuxQuestions.org on (#5P310)
Hi,
I like to see how i can see if a process is in cpu loop.
more y.sh

!/bin/bash
x=1
while [ $x -eq 1 ]
do
echo "test"
done

i execute this script and i see top
pid user pr ni virt res
1757 root 20 0 113284 1156 976 S 99.3 0.1 0:12.49 y.sh

The value under virt and res remain constant.
Is this show that this process is in cpu loop?latest?d=yIl2AUoC8zA latest?i=giwBGhGKI1c:xpXFJ-tbaTE:F7zBnMy latest?i=giwBGhGKI1c:xpXFJ-tbaTE:V_sGLiP latest?d=qj6IDK7rITs latest?i=giwBGhGKI1c:xpXFJ-tbaTE:gIN9vFwgiwBGhGKI1c
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments