[ 一日30分 인생승리의 학습법] Visual Basic application on linux
Hello As I'm starting to work with linux more but still new to the whole linux programming. I work with windows base visual basic programming. the application I'm trying to make is for status of the system while in linux. What would be the best to get started to monitoring system status using ubuntu in visual basic?
I'm going to assume we are talking about VB.NET and not VB 6 (the one used for excel macros).
I you want to write some VB code on Linux you can use the IDE you want. From Gedit to Bluefish, VIM or BASH.
In order to compile VB.NET code you will need a vb compiler (vbnc) and in order to run what's been compiled you will need a mono runtime env (mono).
Here is the way to install them on debian, it should work the same on ubuntu:
Example of usage :
Write this code to a "test.vb" file :
Compile it :
Then run it :
If you want to monitor your system with this you should use the /proc file hierarchy https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html.
The first thing would be to keep a list of the running processes, the resources they use... Anything you can grab from /proc. Then you compare what you grabbed at some point to what is actually running. For example you can get a notification when a program is run for the first time, or if the executable path changed... You can set any "normal situation" parameter you want and set alarms when things are unusual.
The other place where you can find interesting things is /sys https://github.com/torvalds/linux/blob/master/Documentation/filesystems/sysfs.txt
You can track changes in /dev too.
There are many utilities on linux to monitor specific things. You could use them too with some process calls https://docs.microsoft.com/fr-fr/dotnet/api/system.diagnostics.process?view=netframework-4.8 :
ss (command for network stuff)
smartctl (smartmontools packet, allows you to monitor hard drives health)
lsmod (list loaded kernel modules, allows you to detect crashed or added hardware)
sysctl/journalctl (monitoring things started with systemd)
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.