1248 lines
46 KiB
Plaintext
1248 lines
46 KiB
Plaintext
' Gambas class file
|
|
|
|
' Copyright(C) 2011-2014, Michał Głowienka aka eloaders <eloaders@linux.pl>
|
|
'
|
|
' This program is free software; you can redistribute it and/or modify
|
|
' it under the terms of the GNU General Public License as published by
|
|
' the Free Software Foundation; either version 3 of the License, or
|
|
' (at your option) any later version.
|
|
'
|
|
' This program is distributed in the hope that it will be useful,
|
|
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
' GNU General Public License for more details.
|
|
'
|
|
' You should have received a copy of the GNU General Public License
|
|
' along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Public INEXGLINFO As Process
|
|
Private ToolButton[99] As ToolButton
|
|
Private Label[99] As Label ' Dim the array of controls
|
|
Private Button[99] As Button
|
|
Private TextLabel[99] As TextLabel
|
|
Private YESNO As Picture
|
|
Public AllowLog As Boolean
|
|
Public sLine As String
|
|
Public aScan As String[]
|
|
Public cpu As String
|
|
Public CPU_FLAGS As New String[]
|
|
Public CPU_VENDOR_ID As New String[]
|
|
Public CPU_PROCESSOR As New String[]
|
|
Public CPU_CPU_CORES As New String[]
|
|
Public Logs As New Logger
|
|
Public GDF As String
|
|
Public BUFFER As String
|
|
Public DATAT As Collection
|
|
Public UNAME As Collection
|
|
Public USAGE As Collection
|
|
Public SCREENFETCH As Collection
|
|
Public INDEX0 As String
|
|
Public INDEX1 As String
|
|
Public INDEX2 As String
|
|
Public INDEX3 As String
|
|
Public Sub Form_Open()
|
|
Dim default_display_manager As Boolean = Exist("/etc/X11/default-display-manager")
|
|
Dim i As Integer
|
|
Dim data As Stream
|
|
Dim MaxCount As Integer
|
|
Dim sLine As String
|
|
Dim MTRR As New String[]
|
|
Logs("Starting log", Logger.Info)
|
|
ComboBox10.Visible = False
|
|
Object.Call(MCPUSAGE, "GetUSAGE")
|
|
''Okno na środku
|
|
''
|
|
If Settings["Window/X"] = Null Then
|
|
Me.Center
|
|
Else
|
|
Try Me.X = Settings["Window/X", Me.X]
|
|
Try Me.Y = Settings["Window/Y", Me.Y]
|
|
'Try to set Orientation of Tabstrip
|
|
Try TabStrip1.Orientation = Settings["Tab/Pos", TabStrip1.Orientation]
|
|
'If orientation detected then this set size of main window
|
|
Select Case TabStrip1.Orientation
|
|
Case 1
|
|
Logs("TabStrip1.Orientation Left", Logger.Info)
|
|
Orientation_Left_Click()
|
|
Case 2
|
|
Logs("TabStrip1.Orientation Right", Logger.Info)
|
|
Orientation_Right_Click()
|
|
Case 19
|
|
Logs("TabStrip1.Orientation Top", Logger.Info)
|
|
Orientation_Top_Click()
|
|
Case 35
|
|
Logs("TabStrip1.Orientation Bottom", Logger.Info)
|
|
Orientation_Bottom_Click()
|
|
End Select
|
|
Endif
|
|
|
|
Logs("Check whereis inex-cpuid and get JSON Data", Logger.Info)
|
|
Exec [ChkPrm.ChkExecDir("i-nex-cpuid")] Wait To BUFFER
|
|
Logs("Decode JSON Data", Logger.Info)
|
|
DATAT = JSON.Decode(BUFFER)
|
|
Logs("Add Values CPUID", Logger.Info)
|
|
|
|
Label92.Text = DATAT["VENDOR_STR"]
|
|
Label193.Text = DATAT["CPU_CODENAME"]
|
|
Label194.Text = DATAT["BRAND_STR"]
|
|
Label195.Text = "Cores: " & DATAT["NUM_CORES"]
|
|
Label196.Text = "Logical CPUS: " & DATAT["NUM_LOGICAL_CPUS"]
|
|
Label197.Text = "Total Logical CPUS: " & DATAT["TOTAL_LOGICAL_CPUS"]
|
|
Label198.Text = "Family: " & DATAT["FAMILY"]
|
|
Label199.Text = "Model: " & DATAT["MODEL"]
|
|
Label200.Text = "Stepping: " & DATAT["STEPPING"]
|
|
Label201.Text = "Ext Family: " & DATAT["EXT_FAMILY"]
|
|
Label202.Text = "Ext Model: " & DATAT["EXT_MODEL"]
|
|
Label203.Text = "CPU Clock: " & DATAT["CPU_CLOCK"]
|
|
Label204.Text = "CPU Clock BY OS: " & DATAT["CPU_CLOCK_BY_OS"]
|
|
Label205.Text = "CPU Clock BY IC: " & DATAT["CPU_CLOCK_BY_IC"]
|
|
Label206.Text = "CPU Clock Measure: " & DATAT["CPU_CLOCK_MEASURE"]
|
|
Label207.Text = "Mark TSC: " & DATAT["MARK_TSC"]
|
|
Label208.Text = "Mark SYS Clock: " & DATAT["MARK_SYS_CLOCK"]
|
|
Label209.Text = "L1 D: " & DATAT["L1_DATA_CACHE"]
|
|
Label210.Text = "L1 I: " & DATAT["L1_INSTRUCTION_CACHE"]
|
|
Label211.Text = "L2 Cache: " & DATAT["L2_CACHE"]
|
|
Label212.Text = "L3 Cache: " & DATAT["L3_CACHE"]
|
|
Label213.Text = "L1 Assoc: " & DATAT["L1_ASSOC"]
|
|
Label214.Text = "L2 Assoc: " & DATAT["L2_ASSOC"]
|
|
Label215.Text = "L3 Assoc: " & DATAT["L3_ASSOC"]
|
|
Label216.Text = "L1 line: " & DATAT["L1_CACHELINE"]
|
|
Label217.Text = "L2 line: " & DATAT["L2_CACHELINE"]
|
|
Label218.Text = "L3 line: " & DATAT["L3_CACHELINE"]
|
|
Label219.Text = "SSE Size: " & DATAT["SSE_SIZE"]
|
|
|
|
Logs("Create Labels ToolButtons TextLabels in ScrollView1", Logger.Info)
|
|
For i = 1 To 98
|
|
Label[i] = New Label(ScrollView1)
|
|
ToolButton[i] = New ToolButton(ScrollView1)
|
|
Button[i] = New Button(ScrollView1) As "Buttongroup"
|
|
TextLabel[i] = New TextLabel(ScrollView1)
|
|
If DATAT["Flags"][i]["VALUE"] = 1 Then
|
|
YESNO = Picture["Data/check_true.png"]
|
|
Else
|
|
YESNO = Picture["Data/check_false.png"]
|
|
Endif
|
|
With Label[i]
|
|
.X = 2
|
|
.Y = 310 + Int(i * 20)
|
|
.Width = 440
|
|
.Height = 21
|
|
.Border = Border.Raised
|
|
.Padding = 3
|
|
.Font.Size = 8
|
|
.Tooltip = DATAT["Flags"][i]["NAME"]
|
|
.Text = DATAT["Flags"][i]["DESC"]
|
|
If DATAT["Flags"][i]["NAME"] = "CPU_FEATURE_RESERVED" Then
|
|
.Visible = False
|
|
Endif
|
|
End With
|
|
With ToolButton[i]
|
|
.X = 420
|
|
.Y = 310 + Int(i * 20)
|
|
.Width = 21
|
|
.Height = 21
|
|
.Picture = YESNO
|
|
.Tooltip = DATAT["Flags"][i]["VALUE"]
|
|
If DATAT["Flags"][i]["NAME"] = "CPU_FEATURE_RESERVED" Then
|
|
.Visible = False
|
|
Endif
|
|
End With
|
|
With Button[i]
|
|
.X = 400
|
|
.Y = 310 + Int(i * 20)
|
|
.Width = 21
|
|
.Height = 21
|
|
.Font.Bold = True
|
|
.Font.Size = 8
|
|
.Foreground = 6
|
|
.Tooltip = "Open Wikipedia page about this processor feature\n" & DATAT["Flags"][i]["WEBSITE"] & ""
|
|
.Name = DATAT["Flags"][i]["WEBSITE"]
|
|
.Visible = DATAT["Flags"][i]["HAVEWEBSITE"]
|
|
.Picture = Picture["AppIcons/applications-internet.png"]
|
|
End With
|
|
With TextLabel[i]
|
|
.X = 320
|
|
.Y = 310 + Int(i * 20)
|
|
.Width = 80
|
|
.Height = 21
|
|
.Font.Bold = True
|
|
.Font.Size = 8
|
|
.Foreground = 6
|
|
.Alignment = Align.Center
|
|
.Text = DATAT["Flags"][i]["FEATURE"]
|
|
If DATAT["Flags"][i]["NAME"] = "CPU_FEATURE_RESERVED" Then
|
|
.Visible = False
|
|
Endif
|
|
End With
|
|
Next
|
|
|
|
Try data = Open "/proc/mtrr" For Input
|
|
|
|
While Not Eof(data)
|
|
Line Input #data, sLine
|
|
MaxCount += 1
|
|
MTRR.Add(sLine, MaxCount)
|
|
Wend
|
|
|
|
Try Close #data
|
|
|
|
' If Exist("/proc/mtrr", True) Then
|
|
' For i = 1 To MaxCount
|
|
' Label[i] = New Label(ScrollView2)
|
|
' With Label[i]
|
|
' .X = 2
|
|
' .Y = Int(i * 20)
|
|
' .Width = 440
|
|
' .Height = 21
|
|
' .Border = Border.Raised
|
|
' .Padding = 3
|
|
' .Font.Size = 8
|
|
' .Text = MTRR[i - 1]
|
|
' End With
|
|
' Next
|
|
' Endif
|
|
|
|
'Procesor
|
|
Logs("Check available procesors", Logger.Info)
|
|
ComboBox1.List = Dir("/sys/devices/system/cpu/", "cpu[0-9]")
|
|
'Locate kernels
|
|
MaxCount = 0
|
|
' Try data = Shell "ls /boot | grep 'vmlinuz*'" For Input
|
|
'
|
|
' While Not Eof(data)
|
|
' Line Input #data, sLine
|
|
' MaxCount += 1
|
|
' ListBox1.Add(sLine, MaxCount)
|
|
' Wend
|
|
'
|
|
' Try Close #data
|
|
|
|
ListBox1.List = Dir("/boot/", "vmlinuz*")
|
|
Label228.Text = "Installed Kernels: " & CString(Dir("/boot/", "vmlinuz*").Count)
|
|
'End of locate kernels
|
|
If User.Name = "root" Then
|
|
Message.Error(("Running as root is not allowed!\n " & User.Home & ""))
|
|
Endif
|
|
Logs(Settings.Path, Logger.Info)
|
|
Logs(Settings.DefaultDir, Logger.Info)
|
|
Finfosys.TabStrip1[9].Visible = False
|
|
Finfosys.TabStrip1[11].Visible = False
|
|
Logs("Call to MInit for copy nedded files to I-Nex config dir in User.Home", Logger.Info)
|
|
Object.Call(MInit, "_inits")
|
|
Logs("Settings default dir = " & Settings.DefaultDir & "", Logger.Info)
|
|
Button14.Visible = ChkPrm.ChkExec("udisks")
|
|
Logs("Check for Battery", Logger.Info)
|
|
Object.Call(battery, "_inits")
|
|
Logs("Check for Usb device plugged", Logger.Info)
|
|
Object.Call(USB_Drives, "_inits")
|
|
Logs("Check for Drives", Logger.Info)
|
|
Object.Call(Disk_Drives, "_inits")
|
|
Logs("Check for Drives..", Logger.Info)
|
|
Object.Call(Disk_Drives, "_init_2")
|
|
Logs("Check for Drives....", Logger.Info)
|
|
Object.Call(Disk_Drives, "get_informations")
|
|
Logs("Check for Input Drives", Logger.Info)
|
|
Object.Call(Input_Devices, "_inits")
|
|
Logs("Check available network devices", Logger.Info)
|
|
Object.Call(Network, "inits")
|
|
Logs("Check available graphic DSub, DVI etc", Logger.Info)
|
|
Object.Call(FGraphic, "_inits")
|
|
Logs("Call to Graphic", Logger.Info)
|
|
Object.Call(FGraphic, "_check")
|
|
Logs("Check sound cards", Logger.Info)
|
|
Object.Call(Asound_Drives, "_inits")
|
|
Logs("Check for default display manager", Logger.Info)
|
|
If default_display_manager = True Then
|
|
Label4.Visible = True
|
|
Label143.Visible = True
|
|
Label143.Text = File.Load("/etc/X11/default-display-manager")
|
|
Label143.Text = "Deafult DM: " & Replace(Label143.Text, "\n", "")
|
|
Logs("Default display manager is " & Label143.Text, Logger.Info)
|
|
Endif
|
|
'Check temperature. If temterature is OK then timer start 1500/ms. Check temp 1500/ms
|
|
Timer1.Start
|
|
Timer1.Delay = 1500
|
|
TextLabel21.Visible = False
|
|
|
|
'Uruchomienie instrukcji dla poszczególnych zakładek w celu wydobycia informacji z systemu
|
|
Logs("Check Dospam uptime", Logger.Info)
|
|
dospam_uptime()
|
|
Logs("Check System", Logger.Info)
|
|
System()
|
|
Logs("Call to Distribution_Detect", Logger.Info)
|
|
Object.Call(Distribution_Detect, "_inits")
|
|
Logs("Check Bios", Logger.Info)
|
|
bios()
|
|
Logs("Check Kernels", Logger.Info)
|
|
kernel()
|
|
Logs("Check graphic card", Logger.Info)
|
|
grafika()
|
|
''END Uruchomienie instrukcji dla poszczególnych zakładek w celu wydobycia informacji z systemu
|
|
Logs("Set Combobox to cpu0", Logger.Info)
|
|
ComboBox1.Index = 0 ''Ustawienie combobox na Procesor0 / W przeciwnym wypadku nie pokaże nic
|
|
|
|
Label25.Text = Application.version
|
|
Logs(Label25.Text, Logger.Info)
|
|
TabStrip1_Click()
|
|
End
|
|
|
|
Public Sub ComboBox1_Click()
|
|
Logs("Checking procesors", Logger.Info)
|
|
Wykrywanie_procesorow()
|
|
|
|
End
|
|
|
|
Public Sub kernel()
|
|
Dim UNAME_DATA As String
|
|
Try Exec ["/usr/bin/i-nex-uname"] Wait To UNAME_DATA
|
|
Try UNAME = JSON.Decode(UNAME_DATA)
|
|
Try TextLabel7.Text = "System name: " & UNAME["System_name"]
|
|
Try TextLabel16.Text = "Nodename: " & UNAME["Nodename"]
|
|
Try TextLabel17.Text = "Release: " & UNAME["Release"]
|
|
Try TextLabel18.Text = "Version: " & UNAME["Version"]
|
|
Try TextLabel26.Text = "Machine: " & UNAME["Machine"]
|
|
Try TextArea3.Text = File.Load("/proc/cmdline")
|
|
End
|
|
|
|
Public Sub bios()
|
|
Try TextBox2.Text = "Board Vendor: " & Replace(File.Load("/sys/devices/virtual/dmi/id/board_vendor"), "\n", "")
|
|
Try TextBox3.Text = "Board Version: " & Replace(File.Load("/sys/devices/virtual/dmi/id/board_version"), "\n", "")
|
|
Try TextBox4.Text = "Board Name: " & Replace(File.Load("/sys/devices/virtual/dmi/id/board_name"), "\n", "")
|
|
Try TextBox5.Text = "Board Asset Tag: " & Replace(File.Load("/sys/devices/virtual/dmi/id/board_asset_tag"), "\n", "")
|
|
|
|
Try TextBox6.Text = "Bios Vendor: " & Replace(File.Load("/sys/devices/virtual/dmi/id/bios_vendor"), "\n", "")
|
|
Try TextBox21.Text = "Bios Version: " & Replace(File.Load("/sys/devices/virtual/dmi/id/bios_version"), "\n", "")
|
|
Try TextBox22.Text = "Bios Date: " & Replace(File.Load("/sys/devices/virtual/dmi/id/bios_date"), "\n", "")
|
|
|
|
Try TextBox23.Text = "Chassis Vendor: " & Replace(File.Load("/sys/devices/virtual/dmi/id/chassis_vendor"), "\n", "")
|
|
Try TextBox24.Text = "Chassis Version: " & Replace(File.Load("/sys/devices/virtual/dmi/id/chassis_version"), "\n", "")
|
|
Try TextBox25.Text = "Chassis Type: " & Replace(File.Load("/sys/devices/virtual/dmi/id/chassis_asset_tag"), "\n", "")
|
|
Try TextBox26.Text = "Chassis Asset Tag: " & Replace(File.Load("/sys/devices/virtual/dmi/id/product_name"), "\n", "")
|
|
|
|
Try TextBox27.Text = "Product Name: " & Replace(File.Load("/sys/devices/virtual/dmi/id/product_name"), "\n", "")
|
|
Try TextBox28.Text = "Product Version: " & Replace(File.Load("/sys/devices/virtual/dmi/id/product_version"), "\n", "")
|
|
End
|
|
|
|
Public Sub System()
|
|
Dim hostname, arch, gcc, timezone, xorg_version, glx_version As String
|
|
Dim SCREENFETCH_P As Process
|
|
SCREENFETCH_P = Exec ["" & ChkPrm.ChkExecDir("bash") & ""] For Write
|
|
Write #SCREENFETCH_P, File.Load("Data/screenfetch-dev")
|
|
SCREENFETCH_P.Wait
|
|
SCREENFETCH = JSON.Decode(File.Load(User.Home & "/.i-nex/screenfetch.json"))
|
|
|
|
Shell "cat /etc/timezone | grep ^TIMEZONE= /etc/sysconfig/clock | cut -d '=' -f 2" Wait To timezone
|
|
If timezone = Null Or "" Then
|
|
Shell "timedatectl status | grep \"Time zone:\" | cut -d \":\" -f 2 | cut -d \"(\" -f 1" Wait To timezone
|
|
Endif
|
|
'Detect heap size
|
|
For Each sLine In Split(File.Load("/proc/self/maps"), "\n")
|
|
If InStr(sLine, "[heap]") Then
|
|
aScan = Scan(sLine, "*-* *")
|
|
Label176.Text = "Heap size is " & Format(Val("&H" & aScan[1] & "&") - Val("&H" & aScan[0] & "&"), "#,##0") & " bytes."
|
|
Break
|
|
Endif
|
|
Next
|
|
'End od detect heap size
|
|
hostname = System.Host
|
|
arch = System.Architecture
|
|
Shell "gcc -dumpversion" Wait To gcc
|
|
Shell "cat /var/log/Xorg.0.log | grep \"X.Org X Server\" | awk {'print $4'}" Wait To xorg_version
|
|
Shell ChkPrm.ChkExecDir("glxinfo") & "| grep \"GLX version:\" | sed -n '1p' | cut -d ':' -f 2" Wait To glx_version
|
|
'Shell "echo $SHELL" Wait To TextBox67.Text
|
|
Label135.Text = "System SHELL: " & System.Shell
|
|
Label137.Text = "GCC Version: " & Replace(gcc, "\n", "")
|
|
Label138.Text = "Hostname: " & Replace(hostname, "\n", "")
|
|
Label139.Text = "Arch: " & Replace(arch, "\n", "")
|
|
Label140.Text = "Timezone: " & Replace(timezone, "\n", "")
|
|
Label141.Text = "X.Org Version: " & Replace(xorg_version, "\n", "")
|
|
Label142.Text = "GLX Version: " & Replace(glx_version, "\n", "")
|
|
Distribution_Detect._inits
|
|
|
|
Label4.Text = "Distro Vendor: " & SCREENFETCH["Distro"]
|
|
Label135.Text = "Distro Release: " & SCREENFETCH["Distro_Release"]
|
|
Label144.Text = SCREENFETCH["BINUTILS"]
|
|
Label145.Text = "Linux C Library: " & SCREENFETCH["LNXCLIB"]
|
|
Label37.Text = "Desktop environment: " & SCREENFETCH["DE"]
|
|
Label60.Text = "Window manager: " & SCREENFETCH["WM"]
|
|
Label61.Text = "Window manager Theme: " & SCREENFETCH["WinTheme"]
|
|
Label62.Text = "GTK+ 2 Theme: " & SCREENFETCH["GTK2Theme"]
|
|
Label63.Text = "GTK+ 3 Theme: " & SCREENFETCH["GTK3Theme"]
|
|
Label147.Text = "GTK Font: " & SCREENFETCH["GTKFont"]
|
|
Label148.Text = "GTK Icons: " & SCREENFETCH["GTKIcons"]
|
|
Label149.Text = "GNU Make Version: " & SCREENFETCH["GNUMAKE"]
|
|
Label150.Text = "PPP: " & SCREENFETCH["PPP"]
|
|
Label151.Text = "Dynamic linker (ldd): " & SCREENFETCH["DYNAMIC_LINKER"]
|
|
Label152.Text = "Net-tools: " & SCREENFETCH["NETTOOLS"]
|
|
Label153.Text = "Wireless-tools: " & SCREENFETCH["WIRELESS_TOOLS"]
|
|
SCREENFETCH_P.Kill
|
|
SCREENFETCH.Clear
|
|
End
|
|
|
|
Public Sub grafika()
|
|
Dim available_resolutions, Kernel_driver_in_use As String
|
|
Dim rozdzielczosc, gpu, memory_prefetchable, memory_non_prefetchable As String
|
|
Dim GLIXNFO As String
|
|
Dim GLX As String[]
|
|
Dim strings As String
|
|
Exec ["/usr/bin/i-nex-glinfo"] Wait To GLIXNFO
|
|
GLX = Split(GLIXNFO, "\n", "")
|
|
For Each strings In GLX
|
|
If strings Like "*OpenGL vendor string:*" Then
|
|
Try Label105.Text = "OpenGL Vendor: " & Replace(strings, "OpenGL vendor string:", "")
|
|
Endif
|
|
If strings Like "*OpenGL renderer string:*" Then
|
|
Try Label106.Text = "OpenGL Renderer: " & Replace(strings, "OpenGL renderer string:", "")
|
|
Endif
|
|
If strings Like "*OpenGL version string:*" Then
|
|
Try Label107.Text = "OpenGL Version: " & Replace(strings, "OpenGL version string:", "")
|
|
Endif
|
|
If strings Like "*server glx vendor string:*" Then
|
|
Try Label220.Text = "Server glx vendor: " & Replace(strings, "server glx vendor string:", "")
|
|
Endif
|
|
If strings Like "*server glx version string:*" Then
|
|
Try Label221.Text = "Server glx version: " & Replace(strings, "server glx version string:", "")
|
|
Endif
|
|
If strings Like "*client glx vendor string:*" Then
|
|
Try Label222.Text = "Client glx vendor: " & Replace(strings, "client glx vendor string:", "")
|
|
Endif
|
|
If strings Like "*client glx version string:*" Then
|
|
Try Label224.Text = "Client glx version: " & Replace(strings, "client glx version string:", "")
|
|
Endif
|
|
If strings Like "*GLX version:*" Then
|
|
Try Label225.Text = "GLX version: " & Replace(strings, "GLX version:", "")
|
|
Endif
|
|
If strings Like "*OpenGL ES profile version string:*" Then
|
|
Try Label246.Text = "OpenGLES PVS: " & Replace(strings, "OpenGL ES profile version string:", "")
|
|
Endif
|
|
If strings Like "*OpenGL ES profile shading language version string:*" Then
|
|
Try Label247.Text = "OpenGLES PSLVS: " & Replace(strings, "OpenGL ES profile shading language version string:", "")
|
|
Endif
|
|
Next
|
|
|
|
Shell ChkPrm.ChkExecDir("lspci") & " -v -s `lspci | awk '/VGA/{print $1}'` | grep \"Kernel driver in use:\" | cut -d ':' -f 2" Wait To Kernel_driver_in_use
|
|
Shell ChkPrm.ChkExecDir("lspci") & " | grep 'VGA' | cut -d ':' -f3 | cut -d '(' -f 1 | sed -n '1p'" Wait To gpu
|
|
Shell ChkPrm.ChkExecDir("xrandr") & " | grep current | grep 'Screen 0:' | cut -d ':' -f 2" Wait To available_resolutions
|
|
Shell ChkPrm.ChkExecDir("xdpyinfo") & " | grep 'dimensions:' | cut -d ':' -f 2" Wait To rozdzielczosc
|
|
If IsNull(Kernel_driver_in_use) Or IsSpace(Kernel_driver_in_use) = True Then
|
|
Try Exec [ChkPrm.ChkExecDir("xdriinfo")] Wait To Kernel_driver_in_use
|
|
Endif
|
|
Exec ["/bin/bash", "/usr/bin/i-nex-lspci", "nonprefetchable"] Wait To memory_non_prefetchable
|
|
Exec ["/bin/bash", "/usr/bin/i-nex-lspci", "prefetchable"] Wait To memory_prefetchable
|
|
|
|
Label136.Text = "Kernel driver in use: " & Replace(Kernel_driver_in_use, "\n", "")
|
|
Label64.Text = "Total Memory prefetchable: " & Replace(memory_prefetchable, "\n", " - ")
|
|
Label146.Text = "Total Memory non-prefetchable: " & Replace(memory_non_prefetchable, "\n", " - ")
|
|
Label108.Text = "Present resolution: " & Replace(rozdzielczosc, "\n", "")
|
|
TextBox1.Text = RTrim(Replace(gpu, "\n", ""))
|
|
Label109.Text = Replace(available_resolutions, "\n", "")
|
|
|
|
'GPU Logo Detection
|
|
If RTrim(Replace(gpu, "\n", "")) Like "*ati*" Then
|
|
Finfosys.PictureBox1.Picture = Picture["Data/GPU_LOGO/ati.png"]
|
|
Finfosys.PictureBox1.Name = "ati.png"
|
|
Endif
|
|
|
|
If RTrim(Replace(gpu, "\n", "")) Like "*intel*" Then
|
|
Finfosys.PictureBox1.Picture = Picture["Data/GPU_LOGO/intel.png"]
|
|
Finfosys.PictureBox1.Name = "intel.png"
|
|
Endif
|
|
|
|
If RTrim(Replace(gpu, "\n", "")) Like "*nVidia*" Then
|
|
Finfosys.PictureBox1.Picture = Picture["Data/GPU_LOGO/nvidia.png"]
|
|
Finfosys.PictureBox1.Name = "nvidia.png"
|
|
Endif
|
|
'GPU Logo Detection End
|
|
|
|
ComboBox8.Index = 1
|
|
End
|
|
|
|
Public Sub Wykrywanie_procesorow()
|
|
Dim L0TYPE, L1TYPE, L2TYPE, L3TYPE As String
|
|
Dim L0LEVEL, L1LEVEL, L2LEVEL, L3LEVEL As String
|
|
Dim L0WAYS, L1WAYS, L2WAYS, L3WAYS As String
|
|
Dim COHERENCY0, COHERENCY1, COHERENCY2, COHERENCY3 As String
|
|
Dim NUMOFSETS0, NUMOFSETS1, NUMOFSETS2, NUMOFSETS3 As String
|
|
Dim CPUINFO_PROC As File
|
|
Dim sIcon As String
|
|
Dim sLine As String
|
|
Dim iPos As Integer
|
|
Dim Character As Integer
|
|
Dim sKey As String
|
|
Dim sVal As String
|
|
Dim CPU_FAMILYz As New String[]
|
|
Dim CPU_MODEL As New String[]
|
|
Dim CPU_MODEL_NAME As New String[]
|
|
Dim CPU_STEPPING As New String[]
|
|
Dim CPU_MICROCODE As New String[]
|
|
Dim CPU_CPU_MHZ As New String[]
|
|
Dim CPU_CACHE_SIZE As New String[]
|
|
Dim CPU_PHYSICAL_ID As New String[]
|
|
Dim CPU_SIBLINGS As New String[]
|
|
Dim CPU_CORE_ID As New String[]
|
|
Dim CPU_APICID As New String[]
|
|
Dim CPU_INITIAL_APICID As New String[]
|
|
Dim CPU_FPU As New String[]
|
|
Dim CPU_FPU_EXCEPTION As New String[]
|
|
Dim CPU_CPUID_LEVEL As New String[]
|
|
Dim CPU_WP As New String[]
|
|
Dim CPU_BOGOMIPS As New String[]
|
|
Dim CPU_CLFLUSH_SIZE As New String[]
|
|
Dim CPU_CACHE_ALIGNMENT As New String[]
|
|
Dim CPU_ADRESS_SIZES As New String[]
|
|
Dim CPU_POWER_MANAGEMENT As New String[]
|
|
If IsNull(MStart.CPUINFO_FILE) = True Then
|
|
CPUINFO_PROC = Open "/proc/cpuinfo"
|
|
Else
|
|
CPUINFO_PROC = Open MStart.CPUINFO_FILE
|
|
Endif
|
|
For Each sLine In CPUINFO_PROC.Lines
|
|
sLine = Trim(sLine)
|
|
If Not sLine Then Continue
|
|
|
|
iPos = InStr(sLine, ":")
|
|
If iPos = 0 Then Continue
|
|
|
|
sKey = Trim(Left$(sLine, iPos - 1))
|
|
sVal = Trim(Mid$(sLine, iPos + 1))
|
|
|
|
Select Case sKey
|
|
Case "processor"
|
|
CPU_PROCESSOR.Add(sVal)
|
|
Case "vendor_id"
|
|
CPU_VENDOR_ID.Add(sVal)
|
|
Case "cpu family"
|
|
CPU_FAMILYz.Add(sVal)
|
|
Case "model"
|
|
CPU_MODEL.Add(sVal)
|
|
Case "model name"
|
|
Character = InStr(sVal, "@")
|
|
CPU_MODEL_NAME.Add(Trim(Left$(sVal, Character - 1)))
|
|
Case "stepping"
|
|
CPU_STEPPING.Add(sVal)
|
|
Case "microcode"
|
|
CPU_MICROCODE.Add(sVal)
|
|
Case "cpu MHz"
|
|
CPU_CPU_MHZ.Add(sVal)
|
|
Case "cache size"
|
|
CPU_CACHE_SIZE.Add(sVal)
|
|
Case "physical id"
|
|
CPU_PHYSICAL_ID.Add(sVal)
|
|
Case "siblings"
|
|
CPU_SIBLINGS.Add(sVal)
|
|
Case "core id"
|
|
CPU_CORE_ID.Add(sVal)
|
|
Case "cpu cores"
|
|
CPU_CPU_CORES.Add(sVal)
|
|
Case "apicid"
|
|
CPU_APICID.Add(sVal)
|
|
Case "initial apicid"
|
|
CPU_INITIAL_APICID.Add(sVal)
|
|
Case "fpu"
|
|
CPU_FPU.Add(sVal)
|
|
Case "fpu_exception"
|
|
CPU_FPU_EXCEPTION.Add(sVal)
|
|
Case "cpuid level"
|
|
CPU_CPUID_LEVEL.Add(sVal)
|
|
Case "wp"
|
|
CPU_WP.Add(sVal)
|
|
Case "flags"
|
|
CPU_FLAGS.Add(sVal)
|
|
Case "bogomips"
|
|
CPU_BOGOMIPS.Add(sVal)
|
|
Case "clflush size"
|
|
CPU_CLFLUSH_SIZE.Add(sVal)
|
|
Case "cache_alignment"
|
|
CPU_CACHE_ALIGNMENT.Add(sVal)
|
|
Case "address sizes"
|
|
CPU_ADRESS_SIZES.Add(sVal)
|
|
Case "power management"
|
|
CPU_POWER_MANAGEMENT.Add(sVal)
|
|
End Select
|
|
|
|
Next
|
|
|
|
Close #CPUINFO_PROC
|
|
|
|
Label14.Text = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label14.Tooltip = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label71.Text = "Flags: " & FFlags.instructions
|
|
Label13.Text = UCase$(Replace(Replace(Replace(CPU_VENDOR_ID[CFloat(ComboBox1.Index)], "Authentic", ""), "Genuine", ""), "\n", ""))
|
|
Label12.Text = Replace(CPU_CPU_MHZ[CFloat(ComboBox1.Index)], "\n", "") & " MHz"
|
|
Label97.Text = "Family: " & Replace(CPU_FAMILYz[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label6.Text = "Model: " & Replace(CPU_MODEL[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label7.Text = "Stepping: " & Replace(CPU_STEPPING[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label8.Text = "Cores: " & Replace(CPU_SIBLINGS[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label19.Text = "Phy id: " & Replace(CPU_PHYSICAL_ID[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label10.Text = "Bogomips: " & Replace(CPU_BOGOMIPS[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label11.Text = "Address sizes: " & Replace(CPU_ADRESS_SIZES[CFloat(ComboBox1.Index)], "\n", "")
|
|
Label15.Text = "Power mangament: " & Replace(CPU_POWER_MANAGEMENT[CFloat(ComboBox1.Index)], "\n", "")
|
|
|
|
Try INDEX0 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/size"), "\n", "")
|
|
Try INDEX1 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/size"), "\n", "")
|
|
Try INDEX2 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/size"), "\n", "")
|
|
Try INDEX3 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/size"), "\n", "")
|
|
Try L0TYPE = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/type"), "\n", "")
|
|
Try L1TYPE = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/type"), "\n", "")
|
|
Try L2TYPE = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/type"), "\n", "")
|
|
Try L3TYPE = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/type"), "\n", "")
|
|
Try L0LEVEL = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/level"), "\n", "")
|
|
Try L1LEVEL = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/level"), "\n", "")
|
|
Try L2LEVEL = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/level"), "\n", "")
|
|
Try L3LEVEL = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/level"), "\n", "")
|
|
Try L0WAYS = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/ways_of_associativity"), "\n", "")
|
|
Try L1WAYS = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/ways_of_associativity"), "\n", "")
|
|
Try L2WAYS = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/ways_of_associativity"), "\n", "")
|
|
Try L3WAYS = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/ways_of_associativity"), "\n", "")
|
|
Try COHERENCY0 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/coherency_line_size"), "\n", "")
|
|
Try COHERENCY1 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/coherency_line_size"), "\n", "")
|
|
Try COHERENCY2 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/coherency_line_size"), "\n", "")
|
|
Try COHERENCY3 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/coherency_line_size"), "\n", "")
|
|
Try NUMOFSETS0 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/number_of_sets"), "\n", "")
|
|
Try NUMOFSETS1 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index1/number_of_sets"), "\n", "")
|
|
Try NUMOFSETS2 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index2/number_of_sets"), "\n", "")
|
|
Try NUMOFSETS3 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index3/number_of_sets"), "\n", "")
|
|
|
|
Label1.Text = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L0LEVEL,
|
|
INDEX0,
|
|
L0TYPE,
|
|
L0WAYS,
|
|
COHERENCY0,
|
|
NUMOFSETS0)
|
|
Label1.Tooltip = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L0LEVEL,
|
|
INDEX0,
|
|
L0TYPE,
|
|
L0WAYS,
|
|
COHERENCY0,
|
|
NUMOFSETS0)
|
|
Label2.Text = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L1LEVEL,
|
|
INDEX1,
|
|
L1TYPE,
|
|
L1WAYS,
|
|
COHERENCY1,
|
|
NUMOFSETS1)
|
|
Label2.Tooltip = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L1LEVEL,
|
|
INDEX1,
|
|
L1TYPE,
|
|
L1WAYS,
|
|
COHERENCY1,
|
|
NUMOFSETS1)
|
|
Label3.Text = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L2LEVEL,
|
|
INDEX2,
|
|
L2TYPE,
|
|
L2WAYS,
|
|
COHERENCY2,
|
|
NUMOFSETS2)
|
|
Label3.Tooltip = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L2LEVEL,
|
|
INDEX2,
|
|
L2TYPE,
|
|
L2WAYS,
|
|
COHERENCY2,
|
|
NUMOFSETS2)
|
|
|
|
If IsNull(L3LEVEL) = False Then
|
|
|
|
Label5.Text = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L3LEVEL,
|
|
INDEX3,
|
|
L3TYPE,
|
|
L3WAYS,
|
|
COHERENCY3,
|
|
NUMOFSETS3)
|
|
Label5.Tooltip = Subst("Cache L&1 &2 &3 WOA: &4 CLS: &5 NOS: &6",
|
|
L3LEVEL,
|
|
INDEX3,
|
|
L3TYPE,
|
|
L3WAYS,
|
|
COHERENCY3,
|
|
NUMOFSETS3)
|
|
Else
|
|
Label5.Visible = False
|
|
Endif
|
|
|
|
Logs("Get info from database", Logger.Info)
|
|
Object.Call(FCpudb, "_inits")
|
|
End
|
|
|
|
Public Sub Button2_Click()
|
|
ScreenShot.pic = Desktop.Screenshot(Me.X, Me.Y, Me.W + 12, Me.H + 30)
|
|
ScreenShot.Show
|
|
End
|
|
|
|
Public Sub dospam_uptime()
|
|
Dim Users As String
|
|
Dim USAGE_BUFFER As String
|
|
Shell "users | tr ' ' '\n' | wc -l" Wait To Users
|
|
Exec [ChkPrm.ChkExecDir("i-nex-usage")] Wait To USAGE_BUFFER
|
|
USAGE = JSON.Decode(USAGE_BUFFER)
|
|
|
|
Label85.Text = "Total: " &
|
|
Int(USAGE["MEMORY_TOTAL"]) &
|
|
" MB"
|
|
Label86.Text = "Used: " &
|
|
Int(USAGE["MEMORY_USED"]) &
|
|
" MB"
|
|
Label87.Text = "Free: " &
|
|
Int(USAGE["MEMORY_FREE"]) &
|
|
" MB"
|
|
Label88.Text = "Shared: " &
|
|
Int(USAGE["MEMORY_SHARED"]) &
|
|
" MB"
|
|
Label89.Text = "Buffers: " &
|
|
Int(USAGE["MEMORY_BUFFERS"]) &
|
|
" MB"
|
|
Label90.Text = "Cached: " &
|
|
Int(USAGE["MEMORY_CACHED"]) &
|
|
" MB"
|
|
Label223.Text = "Ram used: " &
|
|
Int(USAGE["USED_PLUS_CACHED"]) &
|
|
" MB"
|
|
Label91.Text = "SWAP Total: " &
|
|
Int(USAGE["SWAP_TOTAL"]) &
|
|
" MB "
|
|
TextLabel24.Text = "SWAP memory used: " &
|
|
Int(USAGE["SWAP_USED"]) &
|
|
" MB"
|
|
|
|
TextBox58.Text = "Days: " & USAGE["UPTIME_DAYS"] &
|
|
" " &
|
|
"Hours: " & USAGE["UPTIME_HOURS"] &
|
|
" " &
|
|
"Minutes: " & USAGE["UPTIME_MINUTES"] &
|
|
" " &
|
|
"Seconds: " & USAGE["UPTIME_SECONDS"] &
|
|
" " &
|
|
"Users: " & Subst$(Users) &
|
|
"load average: " & Int(USAGE["LOAD_AVG_1MIN"]) & " " &
|
|
", " & Int(USAGE["LOAD_AVG_5MIN"]) & " " &
|
|
", " & Int(USAGE["LOAD_AVG_15MIN"])
|
|
Label74.Text = USAGE["NUMBER_OF_PROCESSES"]
|
|
|
|
Try ProgressBar1.Value = Int(USAGE["USED_PLUS_CACHED"]) / Int(USAGE["MEMORY_TOTAL"])
|
|
Try ProgressBar4.Value = Int(USAGE["SWAP_USED"]) / Int(USAGE["SWAP_TOTAL"])
|
|
End
|
|
|
|
Public Sub battery_info()
|
|
Logs("Get information Active Battery", Logger.Info)
|
|
TextBox7.Text = battery.Present
|
|
TextBox8.Text = battery.Design_capacity
|
|
TextBox9.Text = battery.last_full_capacity
|
|
TextBox10.Text = battery.battery_technology
|
|
TextBox11.Text = battery.design_voltage
|
|
TextBox12.Text = battery.design_capacity_warning
|
|
TextBox13.Text = battery.design_capacity_low
|
|
TextBox14.Text = battery.cycle_count
|
|
TextBox15.Text = battery.capacity_granularity_1
|
|
TextBox16.Text = battery.capacity_granularity_2
|
|
TextBox17.Text = battery.model_number
|
|
TextBox18.Text = battery.serial_number
|
|
TextBox19.Text = battery.battery_type
|
|
TextBox20.Text = battery.OEM_info
|
|
|
|
Logs("Get information Active Battery Done", Logger.Info)
|
|
If Exist("/sys/class/power_supply/BAT1/", True) Then
|
|
Label177.Text = "Alarm: " & battery.alarm
|
|
Label178.Text = "Capacity: " & battery.capacity
|
|
Label179.Text = "Charge full: " & battery.charge_full
|
|
Label180.Text = "Charge full design: " & battery.charge_full_design
|
|
Label181.Text = "Charge now: " & battery.charge_now
|
|
Label182.Text = "Current now: " & battery.current_now
|
|
Label183.Text = "Cycle count: " & battery.cycle_count
|
|
Label184.Text = "Manufacturer: " & battery.manufacturer
|
|
Label185.Text = "Model name: " & battery.model_name
|
|
Label186.Text = "Present: " & battery.Present
|
|
Label187.Text = "Serial number: " & battery.serial_number
|
|
Label188.Text = "Status: " & battery.status
|
|
Label189.Text = "Technology: " & battery.technology
|
|
Label190.Text = "Battery type: " & battery.battery_type
|
|
Label191.Text = "Voltage min design: " & battery.voltage_min_design
|
|
Label192.Text = "Voltage now: " & battery.voltage_now
|
|
Endif
|
|
|
|
End
|
|
|
|
|
|
Public Sub Button3_Click()
|
|
Logs("Show About Window", Logger.Info)
|
|
About.Show
|
|
|
|
End
|
|
|
|
Public Sub Button7_Click()
|
|
Dim packages As String
|
|
Shell "grep \"^Status: install ok installed\" /var/lib/dpkg/status | wc -l" Wait To packages
|
|
If ChkPrm.ChkExec("rpm") = True And IsNull(packages) = True Then
|
|
Shell "rpm -qa | wc -l" Wait To packages
|
|
Endif
|
|
If ChkPrm.ChkExec("pacman") = True Then
|
|
Shell "pacman -Q|wc -l" Wait To packages
|
|
Endif
|
|
TextLabel21.Visible = True
|
|
|
|
TextLabel21.Text = packages & " Packages are installed "
|
|
End
|
|
|
|
Public Sub Button10_Click()
|
|
|
|
Object.Call(battery, "_inits")
|
|
Logs("Battery initial", Logger.Info)
|
|
End
|
|
|
|
Public Sub ComboBox3_Click()
|
|
Inc Application.Busy
|
|
Disk_Drives.get_informations()
|
|
refreshing()
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub ComboBox4_Click()
|
|
Inc Application.Busy
|
|
Disk_Drives._init_2()
|
|
Disk_Drives.get_informations()
|
|
refreshing()
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub refreshing()
|
|
|
|
TextBox29.Text = "Model: " & Disk_Drives.device_model
|
|
TextBox30.Text = "Vendor: " & Disk_Drives.device_vendor
|
|
Label38.Text = "Part size: " & Disk_Drives.partition_size
|
|
Label250.Text = "Disk size: " & Disk_Drives.real_size
|
|
Label39.Text = "Filesystem: " & Disk_Drives.filesystem_type
|
|
Label41.Text = "Device rev: " & Disk_Drives.device_rev
|
|
Label42.Text = "Max sectors: " & Disk_Drives.max_sectors
|
|
Label43.Text = "State: " & Disk_Drives.device_state
|
|
Label44.Text = "Modalias: " & Disk_Drives.modalias
|
|
Label46.Text = "Ext range: " & Disk_Drives.ext_range
|
|
Label47.Text = "Range: " & Disk_Drives.range
|
|
|
|
Label49.Text = "Add random: " & Disk_Drives.add_random
|
|
Label49.Tooltip = "This file allows to trun off the disk entropy contribution. \n"
|
|
"Default value Of this file Is '1'(on)."
|
|
|
|
Label50.Text = "Discard granularity: " & Disk_Drives.discard_granularity
|
|
Label50.Tooltip = "This shows the size of internal allocation of the device in bytes,\n"
|
|
"if reported by the device. \n"
|
|
"A value Of '0' means device does not support the discard functionality."
|
|
|
|
Label51.Text = "Discard max bytes: " & Disk_Drives.discard_max_bytes
|
|
Label51.Tooltip = "Devices that support discard functionality may have internal limits on\n"
|
|
"the number Of bytes that can be trimmed Or unmapped In a single operation.\n"
|
|
"The discard_max_bytes parameter Is Set by the device driver\n"
|
|
"To the maximum number Of bytes that can be discarded In a single operation.\n"
|
|
"Discard requests issued To the device must Not exceed this limit.A discard_max_bytes\n"
|
|
"value Of 0 means that the device does Not support discard functionality."
|
|
|
|
Label52.Text = "Discard zeroes data: " & Disk_Drives.discard_zeroes_data
|
|
Label52.Tooltip = "When read, this file will show if the discarded block are zeroed by the device Or not.\n"
|
|
"If its value Is '1' the blocks are zeroed otherwise not.\n"
|
|
|
|
Label53.Text = "HW sector size: " & Disk_Drives.hw_sector_size
|
|
Label53.Tooltip = "This is the hardware sector size of the device, in bytes."
|
|
|
|
Label54.Text = "Max HW sectors kb: " & Disk_Drives.max_hw_sectors_kb
|
|
Label54.Tooltip = "This is the maximum number of kilobytes supported in a single data transfer."
|
|
|
|
Label55.Text = "Max sectors kb: " & Disk_Drives.max_sectors_kb
|
|
Label55.Tooltip = "This is the maximum number of kilobytes that the block layer will allow\n"
|
|
"For a filesystem request.\n"
|
|
"Must be smaller than Or equal To the maximum size allowed by the hardware."
|
|
|
|
Label56.Text = "Max segments: " & Disk_Drives.max_segments
|
|
Label56.Tooltip = "Maximum number of segments of the device."
|
|
|
|
Label57.Text = "Max segment size: " & Disk_Drives.max_segment_size
|
|
Label57.Tooltip = "Maximum segment size of the device."
|
|
|
|
Label58.Text = "Read ahead kb: " & Disk_Drives.read_ahead_kb
|
|
Label59.Text = "..:Scheduler:.. \n " & Disk_Drives.scheduler
|
|
|
|
Label126.Text = "Logical block size: " & Disk_Drives.logical_block_size
|
|
Label126.Tooltip = "This is the logcal block size of the device, in bytes."
|
|
|
|
Label127.Text = "IO stats: " & Disk_Drives.iostats
|
|
Label128.Text = "Minimum IO size: " & Disk_Drives.minimum_io_size
|
|
Label128.Tooltip = "This is the smallest preferred io size reported by the device."
|
|
|
|
Label129.Text = "Nomerges: " & Disk_Drives.nomerges
|
|
Label130.Text = "Nr requests: " & Disk_Drives.nr_requests
|
|
Label131.Text = "Optimal IO size: " & Disk_Drives.optimal_io_size
|
|
Label131.Tooltip = "This is the optimal io size reported by the device."
|
|
|
|
Label132.Text = "Physical block size: " & Disk_Drives.physical_block_size
|
|
Label133.Text = "Rotational: " & Disk_Drives.rotational
|
|
Label134.Text = "Rq affinity: " & Disk_Drives.rq_affinity
|
|
|
|
Label123.Text = "BDI max_ratio: " & Disk_Drives.max_ratio
|
|
Label124.Text = "BDI min_ratio: " & Disk_Drives.min_ratio
|
|
Label125.Text = "BDI stable pages required: " & Disk_Drives.stable_pages_required
|
|
|
|
If Disk_Drives.removable Like "0" Then
|
|
Label45.Text = "Removable: No"
|
|
Endif
|
|
If Disk_Drives.removable Like "1" Then
|
|
Label45.Text = "Removable: Yes"
|
|
Endif
|
|
If IsNull(ComboBox3.Text) = False Then
|
|
If Disk_Drives.check_swap Like "*" & ComboBox3.Text & "*" Then
|
|
Label48.Visible = True
|
|
Try ProgressBar2.Value = Disk_Drives.SWAP_USED / Disk_Drives.SWAP_TOTAL
|
|
Else
|
|
Label48.Visible = False
|
|
Endif
|
|
Else
|
|
Label48.Visible = False
|
|
Endif
|
|
TextBox48.Text = Disk_Drives.mount_point
|
|
TextBox52.Text = Disk_Drives.device_uuid
|
|
TextBox53.Text = Disk_Drives.mount_widtch
|
|
|
|
Label16.Text = Disk_Drives.CONNECTED_PORT
|
|
Label17.Text = Disk_Drives.Logical_Size
|
|
|
|
Label251.Text = "HW SATA SPD Limit:" & Space$(2) & Disk_Drives.hw_sata_spd_limit
|
|
Label251.Tooltip = "Maximum speed supported by the connected SATA device."
|
|
Label252.Text = "SATA SPD:" & Space$(2) & Disk_Drives.sata_spd
|
|
Label252.Tooltip = "Current speed of the link [1.5, 3Gps,...]."
|
|
Label253.Text = "SATA SPD Limit:" & Space$(2) & Disk_Drives.sata_spd_limit
|
|
Label253.Tooltip = "Maximum speed imposed by libata."
|
|
|
|
Label122.Text = "USB Speed:" & Space$(2) & Disk_Drives.USB_SPEED
|
|
Label254.Text = "USB Version:" & Space$(2) & Disk_Drives.USB_VERSION
|
|
Label255.Text = "USB Max Power:" & Space$(2) & Disk_Drives.USB_BMAXPOWER
|
|
PictureBox5.Picture = Disk_Drives.USB_PIC
|
|
|
|
PictureBox4.Picture = Disk_Drives.SATA_PIC
|
|
If Disk_Drives.USB_SPEED = Null Then
|
|
Panel2.Visible = False
|
|
Else
|
|
Panel2.Visible = True
|
|
Endif
|
|
|
|
If Disk_Drives.sata_spd = Null Then
|
|
Panel1.Visible = False
|
|
Else
|
|
Panel1.Visible = True
|
|
Endif
|
|
End
|
|
|
|
Public Sub ComboBox5_Click()
|
|
Inc Application.Busy
|
|
USB_Drives.get_informations()
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub ComboBox6_Click()
|
|
Inc Application.Busy
|
|
Asound_Drives._get_informations()
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub ComboBox7_Click()
|
|
Inc Application.Busy
|
|
Input_Devices._get_informations()
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub Button12_Click()
|
|
|
|
FReport_Gen.Show
|
|
|
|
End
|
|
|
|
Public Sub Timer1_Timer()
|
|
''Refresh temp 1500/ms
|
|
dospam_uptime()
|
|
thermal_zone._inits
|
|
If thermal_zone.supporttemp = True Then
|
|
LCDLabel1.Text = Replace("Temp: " & (thermal_zone.calculate / 1000) & " °C", ".", " . ")
|
|
Else
|
|
LCDLabel1.Visible = False
|
|
Endif
|
|
If thermal_zone.supportcritical = True Then
|
|
LCDLabel2.Text = Replace("Crit: " & (thermal_zone.calculatecrit / 1000) & " °C", ".", " . ")
|
|
Else
|
|
LCDLabel2.Visible = False
|
|
Endif
|
|
Try LCDLabel3.Text = VCore.CoreVoltage
|
|
Try LCDLabel3.Visible = VCore.Visible
|
|
End
|
|
|
|
Public Sub Button6_Click()
|
|
|
|
FModules.Show
|
|
|
|
End
|
|
|
|
Public Sub ComboBox2_Click()
|
|
Inc Application.Busy
|
|
Network.get_informations_about_net_interface()
|
|
TextBox56.Text = Network.subsystem_device
|
|
TextBox57.Text = Network.subsystem_vendor
|
|
TextArea4.Text = Network.lspci
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub Button8_Click()
|
|
|
|
FDF.Show
|
|
|
|
End
|
|
|
|
Public Sub Button9_Click()
|
|
|
|
FNET_R_T.Show
|
|
|
|
End
|
|
|
|
Public Sub ComboBox8_Click()
|
|
|
|
Object.Call(FGraphic, "_check")
|
|
|
|
End
|
|
|
|
Public Sub Button14_Click()
|
|
|
|
FUdisks.Show
|
|
|
|
End
|
|
|
|
Public Sub Button15_Click()
|
|
|
|
Clipboard.Copy(TextBox58.Text)
|
|
|
|
End
|
|
|
|
Public Sub Orientation_Top_Click()
|
|
|
|
TabStrip1.Orientation = Align.Top
|
|
Me.W = Int(Label25.X + 365)
|
|
TabStrip1.W = Int(Label25.X + 365)
|
|
Button1.X = Int(Label25.X + 300)
|
|
End
|
|
|
|
Public Sub Orientation_Bottom_Click()
|
|
|
|
TabStrip1.Orientation = Align.Bottom
|
|
Me.W = Int(Label25.X + 365)
|
|
TabStrip1.W = Int(Label25.X + 365)
|
|
Button1.X = Int(Label25.X + 300)
|
|
End
|
|
|
|
Public Sub Orientation_Left_Click()
|
|
|
|
TabStrip1.Orientation = Align.Left
|
|
Me.W = Int(Label25.X + 390)
|
|
TabStrip1.W = Int(Label25.X + 390)
|
|
Button1.X = Int(Label25.X + 325)
|
|
|
|
End
|
|
|
|
Public Sub Orientation_Right_Click()
|
|
|
|
TabStrip1.Orientation = Align.Right
|
|
Me.W = Int(Label25.X + 390)
|
|
TabStrip1.W = Int(Label25.X + 390)
|
|
Button1.X = Int(Label25.X + 325)
|
|
End
|
|
|
|
Public Sub Reportthisw_Click()
|
|
Select Case TabStrip1.Current.Text
|
|
Case "CPU"
|
|
FReport_Gen.CheckBox1.Value = True
|
|
Case "GPU"
|
|
FReport_Gen.CheckBox3.Value = True
|
|
Case "Mobo"
|
|
FReport_Gen.CheckBox2.Value = True
|
|
Case "Audio"
|
|
FReport_Gen.CheckBox4.Value = True
|
|
Case "Drives"
|
|
FReport_Gen.CheckBox14.Value = True
|
|
Case "System"
|
|
FReport_Gen.CheckBox5.Value = True
|
|
Case "Kernel"
|
|
FReport_Gen.CheckBox12.Value = True
|
|
End Select
|
|
FReport_Gen.Show
|
|
|
|
End
|
|
|
|
Public Sub TabStrip1_Click()
|
|
TabPanel1_Click()
|
|
If TabStrip1.Current.Text Like "*CPU*" Then
|
|
ComboBox1.Visible = True
|
|
MenuButton1.Visible = True
|
|
Else
|
|
ComboBox1.Visible = False
|
|
MenuButton1.Visible = False
|
|
Endif
|
|
If TabStrip1.Current.Text Like "*GPU*" Then
|
|
ComboBox8.Visible = True
|
|
Button11.Visible = True
|
|
Else
|
|
ComboBox8.Visible = False
|
|
Button11.Visible = False
|
|
Endif
|
|
If TabStrip1.Current.Text Like "*Drives*" Then
|
|
HBox19.Visible = True
|
|
Button8.Visible = True
|
|
Button14.Visible = True
|
|
Else
|
|
HBox19.Visible = False
|
|
Button8.Visible = False
|
|
Button14.Visible = False
|
|
Endif
|
|
If TabStrip1.Current.Text Like "*Memory*" And ChkPrm.ChkExec("decode-dimms") = True Then
|
|
HBox19.Visible = False
|
|
Button8.Visible = False
|
|
Button14.Visible = False
|
|
ComboBox10.Visible = True
|
|
Else
|
|
ComboBox10.Visible = False
|
|
Endif
|
|
If TabStrip1.Current.Text Like "*Kernel*" Then
|
|
Button6.Visible = True
|
|
Else
|
|
Button6.Visible = False
|
|
Endif
|
|
Me.Text = "I-Nex / " & TabStrip1.Current.Text
|
|
|
|
End
|
|
|
|
Public Sub Button11_Click()
|
|
|
|
FEDID.Show
|
|
|
|
End
|
|
|
|
Public Sub Button16_Click()
|
|
|
|
TabPanel1.Index = 1
|
|
|
|
End
|
|
|
|
Public Sub TabPanel1_Click()
|
|
|
|
If TabPanel1.Current.Text = "CPUID" Then
|
|
ComboBox1.Visible = False
|
|
MenuButton1.Visible = False
|
|
Else If TabPanel1.Current.Text = "CPUINFO" Then
|
|
ComboBox1.Visible = True
|
|
MenuButton1.Visible = True
|
|
Else
|
|
ComboBox1.Visible = False
|
|
MenuButton1.Visible = False
|
|
Endif
|
|
|
|
End
|
|
Public Sub Buttongroup_Click()
|
|
Desktop.Open("" & Last.Name & "")
|
|
End
|
|
|
|
Public Sub Button4_Click()
|
|
|
|
FDIMM.Show
|
|
|
|
End
|
|
|
|
Public Sub ComboBox9_Click()
|
|
|
|
Asound_Drives._INPUT_NAME()
|
|
|
|
End
|
|
|
|
Public Sub Button1_Click()
|
|
Form_Close()
|
|
End
|
|
|
|
Public Sub Form_Move()
|
|
|
|
Settings["Window/X"] = Me.X
|
|
Settings["Window/Y"] = Me.Y
|
|
|
|
End
|
|
|
|
Public Sub Form_Close()
|
|
|
|
Settings["Window/X"] = Me.X
|
|
Settings["Window/Y"] = Me.Y
|
|
Settings["Tab/Pos"] = TabStrip1.Orientation
|
|
Logs("Good bye!", Logger.Info)
|
|
USAGE.Clear
|
|
DATAT.Clear
|
|
MCPUSAGE.CPUusage.Kill
|
|
Me.Close
|
|
|
|
End
|
|
|
|
Public Sub Button13_Click()
|
|
FValidate.Show
|
|
End
|
|
|
|
Public Sub MenuButton1_Click()
|
|
|
|
Dim URL As String
|
|
Inc Application.Busy
|
|
VALIDATE._inits()
|
|
URL = VALIDATE.SendReportToServer(User.Home & "/.i-nex/VALID", "Validate", "https://i-nex.pl/", Settings["Cerbero/USERNAME"], Settings["Cerbero/API"])
|
|
FCopyUrl.TextBox1.Text = URL
|
|
FCopyUrl.Show
|
|
Dec Application.Busy
|
|
End
|
|
|
|
Public Sub Savevalid_Click()
|
|
VALIDATE._inits()
|
|
Dialog.SaveFile
|
|
If Exist(Dialog.Path) = True Then
|
|
Kill Dialog.Path
|
|
Endif
|
|
Try Copy User.Home & "/.i-nex/VALID" To Dialog.Path
|
|
If Error Then
|
|
Logs("Not chosen where you want to save the report", Logger.Error)
|
|
Endif
|
|
|
|
End
|
|
|
|
Public Sub Button17_Click()
|
|
|
|
Desktop.Open("https://www.google.com/maps/search/" & Label237.Text & "")
|
|
|
|
End
|
|
|
|
Public Sub Button18_Click()
|
|
|
|
FSystemInfo.Show
|
|
|
|
End
|
|
|
|
Public Sub Button19_Click()
|
|
|
|
Network.IP_INFO()
|
|
|
|
End
|
|
|
|
Public Sub Button20_Click()
|
|
|
|
Disk_Drives._inits()
|
|
Disk_Drives._init_2()
|
|
|
|
End
|
|
|
|
Public Sub ComboBox10_Click()
|
|
|
|
Try TextBox31.Text = Replace(MDecode_dimms.MODULE_MANUFACTURER[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox32.Text = Replace(MDecode_dimms.DRAM_MANUFACTURER[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox33.Text = Replace(MDecode_dimms.MODULE_TYPE[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox34.Text = Replace(MDecode_dimms.PART_NUMBER[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox35.Text = Replace(MDecode_dimms.RAM_SIZE[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox36.Text = Replace(MDecode_dimms.tCL_tRCD_tRDP_tRAS[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox37.Text = Replace(MDecode_dimms.SDRAM_DEVICE_TYPE[CFloat(ComboBox10.Index)], "\n", "")
|
|
Try TextBox38.Text = Replace(MDecode_dimms.MAX_MODULE_SPEED[CFloat(ComboBox10.Index)], "\n", "")
|
|
End
|