This commit is contained in:
hehaoyang 2024-01-25 18:37:25 +08:00
parent e827eb150a
commit be7dd0da25
12 changed files with 88 additions and 82 deletions

View File

@ -1,4 +1,4 @@
#include "HxBroadcast.h"
#include "HxBroadcast.h"
#include <QHostAddress>
#include <QJsonDocument>

View File

@ -1,4 +1,4 @@
#ifndef HXBROADCAST_H
#ifndef HXBROADCAST_H
#define HXBROADCAST_H
#include <QObject>

View File

@ -1,4 +1,4 @@
#include "HxDisk.h"
#include "HxDisk.h"
void HxDisk::mkpath(QString path)
{

View File

@ -1,4 +1,4 @@
#ifndef HXDISK_H
#ifndef HXDISK_H
#define HXDISK_H
#include "HxTrace.h"

View File

@ -1,4 +1,4 @@
#include "HxSocket.h"
#include "HxSocket.h"
#include "HxThread.h"
#include <QHostInfo>

View File

@ -1,4 +1,4 @@
#ifndef HXSQL_H
#ifndef HXSQL_H
#define HXSQL_H
#include <QSqlDatabase>

View File

@ -1,4 +1,4 @@
#include "HxSystem.h"
#include "HxSystem.h"
#include "HxProcess.h"
#include <QSettings>
@ -112,6 +112,10 @@ bool HxSystem::get_memory_status(double *memory_use, double *memory_total, doubl
bool HxSystem::get_program_status(double *cpu_usage, double *virtual_memory, double *resident_memory)
{
Q_UNUSED(cpu_usage);
Q_UNUSED(virtual_memory);
Q_UNUSED(resident_memory);
#ifdef Q_OS_LINUX
auto result = HxProcess::start(QString("ps u %1").arg(getpid()));
@ -193,6 +197,8 @@ bool HxSystem::get_harddisk_temperature(QString file_system, QString *temperatur
bool HxSystem::get_harddisk_smart(QString file_system, QString *smart)
{
Q_UNUSED(file_system);
Q_UNUSED(smart);
#ifdef Q_OS_LINUX
auto result = HxProcess::start(QString("echo tvis | sudo -S smartctl -i %1 | grep 'SMART support is'").arg(file_system));
if(result.indexOf("Unavailable") != -1)

View File

@ -1,4 +1,4 @@
#ifndef HXSYSTEM_H
#ifndef HXSYSTEM_H
#define HXSYSTEM_H
#include <QObject>

View File

@ -1,4 +1,4 @@
#ifndef HXTASK_H
#ifndef HXTASK_H
#define HXTASK_H
#include "HxTrace.h"

View File

@ -1,4 +1,4 @@
#ifndef HXTHREAD_H
#ifndef HXTHREAD_H
#define HXTHREAD_H
#include <QObject>