5
DIM cpuz0, cpuz1, cpuz2, cpuz3, cpuz4, cpuz5 AS String
6
TextLabel10.Visible = FALSE
7
TextArea28.Visible = FALSE
8
TextLabel21.Visible = FALSE
11
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '1p'" WAIT TO cpuz0
12
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '2p'" WAIT TO cpuz1
13
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '3p'" WAIT TO cpuz2
14
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '4p'" WAIT TO cpuz3
15
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '5p'" WAIT TO cpuz4
16
SHELL "ls /sys/devices/system/cpu/ | grep -v save | sed -n '6p'" WAIT TO cpuz5
18
cpuz0 = Replace(cpuz0, "\n", "")
19
cpuz1 = Replace(cpuz1, "\n", "")
20
cpuz2 = Replace(cpuz2, "\n", "")
21
cpuz3 = Replace(cpuz3, "\n", "")
22
cpuz4 = Replace(cpuz4, "\n", "")
23
cpuz5 = Replace(cpuz5, "\n", "")
24
IF (cpuz0 = "cpu0") = TRUE THEN
25
ComboBox1.Add("Procesor0")
28
IF (cpuz1 = "cpu1") = TRUE THEN
29
ComboBox1.Add("Procesor1")
32
IF (cpuz2 = "cpu2") = TRUE THEN
33
ComboBox1.Add("Procesor2")
36
IF (cpuz3 = "cpu3") = TRUE THEN
37
ComboBox1.Add("Procesor3")
40
IF (cpuz4 = "cpu4") = TRUE THEN
41
ComboBox1.Add("Procesor4")
44
IF (cpuz5 = "cpu5") = TRUE THEN
45
ComboBox1.Add("Procesor5")
56
ComboBox1.Text = "Procesor0"
57
Label25.Text = Application.version
64
PUBLIC SUB ComboBox1_Click()
66
Wykrywanie_procesorow()
71
DIM stringa, risultato, kernel, uzywanyobecniekernel AS String
72
DIM righe AS NEW string[]
74
DIM riga AS NEW String[]
75
DIM lista AS NEW String[]
76
SHELL "ls /boot/vmlinuz* | cut -d '/' -f 3 " WAIT TO TextArea47.Text
77
SHELL "ls /boot/vmlinuz* | cut -d '/' -f 3 | wc -l" WAIT TO Label16.Text
78
SHELL "uname -r" WAIT TO Label26.Text
80
SHELL "dpkg-query -W --showformat='${Package}\n' | grep 'linux-image'" TO stringa
82
righe = Split(stringa, "\n", "%%", TRUE)
84
FOR count = 2 TO righe.Max
86
riga = Split(righe[count], " ", "%%", TRUE)
88
risultato = Replace(riga[0], " ", "")
92
ComboBox3.List = lista
94
'Koniec usuwania kerneli
100
DIM kartadzwiekowa, kartadzwiekowa2 AS String
101
SHELL "lspci | grep 'udio' | cut -d ':' -f 3 | cut -d '(' -f 1" WAIT TO kartadzwiekowa
102
TextArea18.Text = kartadzwiekowa
107
DIM wolnegbnadysku, dysktwardy, zajetegb, calkowitapoj AS String
108
DIM wolgb, zajgb, calkowite AS Float
109
'SHELL "cat /proc/scsi/scsi | grep ATA | head -1 | cut -d ':' -f 3 | cut -d ' ' -f 2-3 && echo $(cat /proc/partitions | grep sda | head -n 1 | awk {'print $3'})/1024/1024 | bc && echo GB" WAIT TO dysktwardy
110
SHELL "cat /proc/scsi/scsi | grep 'Vendor'" WAIT TO dysktwardy
111
SHELL "echo $(df -m | grep '/' | awk {'print $4'} | head -1)/1000 | bc && echo GB" WAIT TO wolnegbnadysku
112
SHELL "echo $(df -m | grep '/' | awk {'print $3'} | head -1)/1000 | bc && echo GB" WAIT TO zajetegb
113
SHELL "echo $(df -m | grep '/' | awk {'print $2'} | head -1)/1000 | bc && echo GB" WAIT TO calkowitapoj
115
SHELL "df -m | grep / | awk {'print $4'} | head -n 1" WAIT TO wolgb
116
SHELL "df -m | grep / | awk {'print $3'} | head -n 1" WAIT TO zajgb
117
SHELL "df -m | grep / | awk {'print $2'} | head -n 1" WAIT TO calkowite
118
TextLabel1.Text = wolnegbnadysku
119
TextArea24.Text = dysktwardy
120
TextLabel6.Text = zajetegb
121
TextLabel13.Text = calkowitapoj
122
ProgressBar2.Value = wolgb / calkowite
123
ProgressBar3.Value = zajgb / calkowite
127
DIM bios_vendor, bios_version, bios_date, board_name, board_vendor AS String
128
SHELL "cat /sys/devices/virtual/dmi/id/bios_vendor" TO bios_vendor
129
SHELL "cat /sys/devices/virtual/dmi/id/bios_version" TO bios_version
130
SHELL "cat /sys/devices/virtual/dmi/id/bios_date" TO bios_date
131
SHELL "cat /sys/devices/virtual/dmi/id/board_vendor" TO board_vendor
132
SHELL "cat /sys/devices/virtual/dmi/id/board_name" TO board_name
133
TextArea25.Text = bios_vendor
134
TextArea26.Text = bios_version
135
TextArea27.Text = bios_date
136
TextArea15.Text = board_vendor
137
TextArea16.Text = board_name
141
DIM hostname, dist, release, arch, gcc, timezone, xorg_version, glx_version AS String
142
SHELL "cat /etc/timezone" WAIT TO timezone
143
SHELL "hostname" WAIT TO hostname
144
SHELL "cat /etc/issue.net" WAIT TO dist
145
SHELL "sed 's/DISTRIB_RELEASE=//' /etc/lsb-release | sed -n '2p'" WAIT TO release
146
SHELL "uname -m" WAIT TO arch
147
SHELL "gcc -dumpversion" WAIT TO gcc
148
SHELL "xdpyinfo | grep 'X.Org version:' | sed -n '1p' | cut -d ':' -f 2" WAIT TO xorg_version
149
SHELL "glxinfo | grep 'GLX version:' | sed -n '1p' | cut -d ':' -f 2" WAIT TO glx_version
151
TextArea31.Text = gcc
152
TextArea33.Text = hostname
153
TextArea29.Text = dist
154
TextArea32.Text = release
155
TextArea36.Text = arch
156
TextArea30.Text = timezone
157
TextArea34.Text = xorg_version
158
TextArea35.Text = glx_version
162
DIM stringa, risultato, gpu, opengl_vendor_string, opengl_renderer_string, opengl_version_string, rozdzielczosc AS String
163
DIM righe AS NEW string[]
165
DIM riga AS NEW String[]
166
DIM lista AS NEW String[]
167
SHELL "lspci | grep 'VGA' | cut -d ':' -f3 | cut -d '(' -f 1" WAIT TO gpu
168
SHELL "glxinfo | grep 'OpenGL vendor string:' | sed -n '1p' | cut -d ':' -f 2" WAIT TO opengl_vendor_string
169
SHELL "glxinfo | grep 'OpenGL renderer string:' | sed -n '1p' | cut -d ':' -f 2" WAIT TO opengl_renderer_string
170
SHELL "glxinfo | grep 'OpenGL version string:' | sed -n '1p' | cut -d ':' -f 2" WAIT TO opengl_version_string
171
SHELL "xdpyinfo | grep 'dimensions:' | cut -d ':' -f 2" WAIT TO rozdzielczosc
172
'Zmiana rozdzielczości
173
SHELL "xrandr" TO stringa
175
righe = Split(stringa, "\n", "%%", TRUE)
177
FOR count = 2 TO righe.Max
179
riga = Split(righe[count], " ", "%%", TRUE)
181
risultato = Replace(riga[0], " ", "")
185
ComboBox2.List = lista
187
'Koniec zmiany rozdzielczości
189
TextArea17.Text = gpu
190
TextArea19.Text = opengl_vendor_string
191
TextArea20.Text = opengl_renderer_string
192
TextArea21.Text = opengl_version_string
193
TextArea38.Text = rozdzielczosc
194
Global.kartagraficzna()
198
PUBLIC SUB internet()
199
DIM domyslnaprzegladarka, network_controller, ethernet_controller AS String
200
SHELL "x-www-browser -version" WAIT TO domyslnaprzegladarka
201
SHELL "lspci | grep 'Network' | cut -d ':' -f 3 | cut -d '(' -f 1" WAIT TO network_controller
202
SHELL "lspci | grep 'Ethernet' | cut -d ':' -f 3 | cut -d '(' -f 1" WAIT TO ethernet_controller
203
'SHELL "ss -a" WAIT TO ssa
204
TextArea46.Text = domyslnaprzegladarka
205
TextArea22.Text = network_controller
206
TextArea23.Text = ethernet_controller
207
'TextArea48.Text = ssa
211
PUBLIC SUB Wykrywanie_procesorow()
212
DIM eloaders, eloaders2, eloaders3, obrazekcpu, cpu, vendor_id, flags, cpu_MHz, model, stepping, cpu_family, bogomips, address_sizes, cache_size, ldata, linstruction AS String
214
IF ComboBox1.Text = "Procesor0" THEN
219
IF ComboBox1.Text = "Procesor1" THEN
224
IF ComboBox1.Text = "Procesor2" THEN
229
IF ComboBox1.Text = "Procesor3" THEN
234
IF ComboBox1.Text = "Procesor4" THEN
239
IF ComboBox1.Text = "Procesor5" THEN
245
SHELL "cat /proc/cpuinfo | grep 'vendor_id' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO obrazekcpu
246
SHELL "cat /proc/cpuinfo | grep 'model name'| sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO cpu
247
SHELL "cat /proc/cpuinfo | grep 'vendor_id' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO vendor_id
248
SHELL "cat /proc/cpuinfo | grep 'flags' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO flags
249
SHELL "cat /proc/cpuinfo | grep 'cpu MHz' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO cpu_MHz
250
SHELL "cat /proc/cpuinfo | grep 'model' | sed -n '" & eloaders3 & "' | cut -d ':' -f 2" WAIT TO model
251
SHELL "cat /proc/cpuinfo | grep 'stepping' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO stepping
252
SHELL "cat /proc/cpuinfo | grep 'cpu family' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO cpu_family
253
SHELL "cat /proc/cpuinfo | grep 'bogomips' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO bogomips
254
SHELL "cat /proc/cpuinfo | grep 'address sizes' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO address_sizes
255
SHELL "cat /proc/cpuinfo | grep 'cache size' | sed -n '" & eloaders & "' | cut -d ':' -f 2" WAIT TO cache_size
256
SHELL "cat /sys/devices/system/cpu/" & eloaders2 & "/cache/index0/size" WAIT TO ldata
257
SHELL "cat /sys/devices/system/cpu/" & eloaders2 & "/cache/index1/size" WAIT TO linstruction
260
TextArea3.Text = flags
261
TextArea4.Text = vendor_id
262
TextArea5.Text = cpu_MHz
263
TextArea7.Text = model
264
TextArea8.Text = stepping
265
TextArea6.Text = cpu_family
266
TextArea9.Text = bogomips
267
TextArea10.Text = address_sizes
268
TextArea12.Text = cache_size
269
TextArea13.Text = ldata
270
TextArea11.Text = linstruction
276
PUBLIC SUB Button2_Click()
278
SHELL "gnome-screenshot -w"
282
PUBLIC SUB Button1_Click()
288
PUBLIC SUB dospam_uptime()
289
DIM uptime, total, used, freee, shared, buffers, cached, usedonthistime, swaptotal AS String
290
DIM dospam, totpam, totalswap, usedswap AS Float
291
SHELL "echo `free -m | grep 'Mem' | awk {'print $2'}` MB" WAIT TO total
292
SHELL "echo `free -m | awk {'print $2'} | sed -n '2p'` MB" WAIT TO used
293
SHELL "echo `free -m | awk {'print $3'} | sed -n '2p'` MB" WAIT TO freee
294
SHELL "echo `free -m | awk {'print $4'} | sed -n '2p'` MB" WAIT TO shared
295
SHELL "echo `free -m | awk {'print $5'} | sed -n '2p'` MB" WAIT TO buffers
296
SHELL "echo `free -m | awk {'print $6'} | sed -n '2p'` MB" WAIT TO cached
297
SHELL "free -m | grep - | awk {'print $3'}" TO dospam
298
SHELL "echo `free -m | grep - | awk {'print $3'}` MB" TO usedonthistime
299
SHELL "free -m | grep Mem | awk {'print $2'}" WAIT TO totpam
300
SHELL "echo `free -m | grep 'Swap:' | awk {'print $2'}` MB" WAIT TO swaptotal
301
'Obliczanie zajętości swap
302
SHELL "swapon -s | awk {'print $3'} | sed -n '2p'" WAIT TO totalswap
303
SHELL "swapon -s | awk {'print $4'} | sed -n '2p'" WAIT TO usedswap
304
TextArea39.Text = total
305
TextArea40.Text = used
306
TextArea41.Text = freee
307
TextArea42.Text = shared
308
TextArea43.Text = buffers
309
TextArea44.Text = cached
310
TextLabel7.Text = usedonthistime
311
TextArea45.Text = swaptotal
312
TextLabel24.Text = usedswap / 1000
313
SHELL "uptime" TO uptime
314
TextArea37.Text = uptime
316
ProgressBar1.Value = dospam / totpam
317
ProgressBar4.Value = usedswap / totalswap
321
PUBLIC SUB Button3_Click()
327
PUBLIC SUB Button5_Click()
333
PUBLIC SUB Button6_Click()
339
PUBLIC SUB Button4_Click()
341
Desktop.Open("http://www.cpu-world.com/cgi-bin/SearchSite.pl?SEARCH=" & TextArea1.Text & "&PROCESS=Search")
345
PUBLIC SUB Button7_Click()
347
SHELL "cat /var/lib/dpkg/status | grep '^Status: install ok installed' | wc -l" WAIT TO dpkg
348
TextLabel10.Visible = TRUE
349
TextArea28.Visible = TRUE
350
TextLabel21.Visible = TRUE
351
TextArea28.Text = dpkg
355
PUBLIC SUB Button9_Click()
361
PUBLIC SUB Button8_Click()
363
SHELL "xrandr -s " & ComboBox2.Text & "" WAIT
368
PUBLIC SUB Button10_Click()
369
'sudo apt-get -y remove
370
EXEC ["gksu", "sudo apt-get -y remove " & ComboBox3.Text & ""] WAIT
372
Message.Warning("Dla poprawności tego działania proszę\nzaktualizuj gruba poleceniem = sudo update-grub")