Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ git submodule update --init --recursive
Install cmake (and libasan on Linux) then:

```
mkdir build
rm -rf build && mkdir build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is probably good to mention here that one can use mkdir -p here to prevent a full rebuild. If one wants a full rebuild then delete it all and start over.

cd build
cmake ..
cmake --build .
Expand Down
6 changes: 3 additions & 3 deletions scripts/bhs-power-mode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ while read -r line; do
die_key="${instance}:${entry}"
if [[ $line == *"value 1"* ]]; then
die_types[$die_key]="IO"
io_dies+=("$die_key")
io_dies+=("$die_key")
elif [[ $line == *"value 0"* ]]; then
die_types[$die_key]="Compute"
compute_dies+=("$die_key")
compute_dies+=("$die_key")
fi
fi
done <<< "$output"

if [ "$1" == "--optimized-power-mode" ]; then
echo "Setting optimized power mode..."
echo "Setting optimized power mode..."

for die_key in "${io_dies[@]}"; do
instance="${die_key%:*}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/find_field.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{
for(i=1; i<=NF; i++) {
if (index($i, term) > 0) print (i)":"$i;
}
}
}
13 changes: 6 additions & 7 deletions scripts/grafana/stop.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

CTR_RUN=${CTR_RUN:-docker}
for c in grafana telegraf influxdb prometheus; do

id=`${CTR_RUN} ps -a -q --filter="name=$c" --format="{{.ID}}"`
if [ ! -z "$id" ]
then
echo Stopping and deleting $c
${CTR_RUN} rm $(${CTR_RUN} stop $id)
fi
id=`${CTR_RUN} ps -a -q --filter="name=$c" --format="{{.ID}}"`
if [ ! -z "$id" ]
then
echo Stopping and deleting $c
${CTR_RUN} rm $(${CTR_RUN} stop $id)
fi
done

${CTR_RUN} network rm prometheus-network influxdb-network
Expand Down
40 changes: 20 additions & 20 deletions scripts/ufs-die-stat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ echo "$output" | while read -r line; do
if [[ $line =~ Read\ value\ ([0-9]+)\ from\ TPMI\ ID\ 2@16\ for\ entry\ ([0-9]+)\ in\ instance\ ([0-9]+) ]]; then
# Extract the value using BASH_REMATCH
value=${BASH_REMATCH[1]}
die=${BASH_REMATCH[2]}
instance=${BASH_REMATCH[3]}
# Extract socket ID if present in the output (format: "(socket X)")
if [[ $line =~ \(socket\ ([0-9]+)\) ]]; then
socket=${BASH_REMATCH[1]}
else
# Fallback to instance ID if socket info is not available
socket=$instance
fi

# Extract NUMA node ID if present in the output (format: "(NUMA node X)")
numa_node=""
if [[ $line =~ \(NUMA\ node\ ([0-9]+)\) ]]; then
numa_node=${BASH_REMATCH[1]}
fi
die=${BASH_REMATCH[2]}
instance=${BASH_REMATCH[3]}

# Extract socket ID if present in the output (format: "(socket X)")
if [[ $line =~ \(socket\ ([0-9]+)\) ]]; then
socket=${BASH_REMATCH[1]}
else
# Fallback to instance ID if socket info is not available
socket=$instance
fi

# Extract NUMA node ID if present in the output (format: "(NUMA node X)")
numa_node=""
if [[ $line =~ \(NUMA\ node\ ([0-9]+)\) ]]; then
numa_node=${BASH_REMATCH[1]}
fi

freq=$(( (value & 0x7F) * 100 ))
compute=$(( (value >> 23) & 1 ))
Expand All @@ -39,16 +39,16 @@ echo "$output" | while read -r line; do

die_type=""
if [ "$compute" -ne 0 ]; then
die_type="compute/"
die_type="compute/"
fi
if [ "$llc" -ne 0 ]; then
die_type="${die_type}LLC/"
die_type="${die_type}LLC/"
fi
if [ "$memory" -ne 0 ]; then
die_type="${die_type}memory/"
die_type="${die_type}memory/"
fi
if [ "$io" -ne 0 ]; then
die_type="${die_type}IO"
die_type="${die_type}IO"
fi
die_type="${die_type%"${die_type##*[!\/]}"}"
str="Socket $socket"
Expand Down
Loading