-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show Memory prefetchable And non-prefetchable in GPU tab
- Loading branch information
Showing
6 changed files
with
202 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
#!/bin/bash | ||
lspci -v -s `lspci | awk '/VGA/{print $1}'` | sed -n '/Memory.*, prefetchable/s/.*\[size=\([^]]\+\)\]/\1/p' | ||
#!/usr/bin/env bash | ||
lspci_nonpre() { | ||
lspci -v -s `lspci | awk '/VGA/{print $1}'` | sed -n '/Memory.*, prefetchable/s/.*\[size=\([^]]\+\)\]/\1/p' | ||
} | ||
|
||
lspci_pre() { | ||
lspci -v -s `lspci | awk '/VGA/{print $1}'` | sed -n '/Memory.*, non-prefetchable/s/.*\[size=\([^]]\+\)\]/\1/p' | ||
} | ||
error() { | ||
printf '\ni-nex-lspci is part of I-Nex project licensed under LGPL v3\n' | ||
printf 'This program chow prefetchable and nonprefetchable GPU memory\n' | ||
printf '\nusage: i-nex-lspci nonprefetchable|prefetchable\n\n' | ||
} | ||
case $1 in | ||
nonprefetchable) lspci_nonpre; exit 0;; | ||
prefetchable) lspci_pre; exit 0;; | ||
*) error; exit 0;; | ||
esac |
Oops, something went wrong.