Skip to content

Commit

Permalink
use new temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
RheaAyase committed Feb 11, 2025
1 parent 5d1ab91 commit 2d487cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Valkyrja-methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ private string GetStatusString(TimeSpan latency, Server server)
string cpuLoad = Bash.Run("grep 'cpu ' /proc/stat | awk '{print ($2+$4)*100/($2+$4+$5)}'");
string memoryUsed = Bash.Run("free | grep Mem | awk '{print $3/$2 * 100.0}'");
double memoryPercentage = double.Parse(memoryUsed);
string[] temp = Bash.Run("sensors | egrep '(temp1|Tdie|Tctl)' | awk '{print $2}'").Split('\n');
string[] temp = Bash.Run("sensors | grep -E '(Tctl|Tccd1|Tccd2|temp1)' | awk '{print $2}'").Split('\n');
string subscription = IsPartner(server.Id) ? "Partner " : (IsSubscriber(server.Guild.OwnerId) ? "Subscriber" : "");

return "Service Status: <https://status.valkyrja.app>\n" +
$"```md\n" +
$"[ Memory usage ][ {memoryPercentage:#00.00} % ({memoryPercentage / 100 * 128:000.00}/128 GB) ]\n" +
$"[ CPU Load ][ {double.Parse(cpuLoad):#00.00} % ({temp[1]}) ]\n" +
$"[ CPU Load ][ {double.Parse(cpuLoad):#00.00} % ({temp[0]}) ]\n" +
$"[ Shard ID ][ {this.CurrentShard.Id - 1:00} ]\n" +
$"[ Subscription ][ {subscription} ]\n" +
$"```\n" +
Expand Down

0 comments on commit 2d487cc

Please sign in to comment.