Skip to content

Commit

Permalink
_mem should use FB memory used, only
Browse files Browse the repository at this point in the history
NVIDIA 6 added differentiation between FB and BAR1 memory - use nvidia_gpu_mem for FB Memory *only* since its definition fits better with the usage prior to BAR1 memory.
  • Loading branch information
leeclemens committed May 4, 2014
1 parent e4ef822 commit 61f058f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/gpu/nvidia_gpu_
Expand Up @@ -127,7 +127,7 @@ if [ "$1" = "config" ]; then
;;
mem)
# First determine total memory of each GPU...
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMem=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
Expand All @@ -146,7 +146,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args -l 0 -u 100'
echo 'graph_vlabel Percentage'
echo 'graph_category gpu'
echo "graph_info Memory usage for NVIDIA GPUs using driver version $driverVersion (total memory is $gpusTotalMem)"
echo "graph_info FB Memory usage for NVIDIA GPUs using driver version $driverVersion (total memory is $gpusTotalMem)"
;;
fan)
echo 'graph_title GPU fan speed'
Expand Down Expand Up @@ -189,8 +189,8 @@ case $name in
valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2`
;;
mem)
totalMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`
usedMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Used" | cut -d : -f 2 | cut -d ' ' -f 2`
totalMemGpus=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`
usedMemGpus=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Used" | cut -d : -f 2 | cut -d ' ' -f 2`
valueGpus=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
Expand Down

3 comments on commit 61f058f

@asgh
Copy link
Contributor

@asgh asgh commented on 61f058f Aug 20, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work with my version of nvidia-smi, I submitted a pull request to reverse this.

@leeclemens
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide the version of xorg-x11-drv-nvidia or nvidia-smi you are using?

@asgh
Copy link
Contributor

@asgh asgh commented on 61f058f Sep 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v4.304.117

Please sign in to comment.