[ 一日30分 인생승리의 학습법] Visual Basic application on linux 

[Question]

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?


Joseph

 

[Answer]

Hello,

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:

Code:
# apt install mono-runtime mono-vbnc


Example of usage :

Write this code to a "test.vb" file :

Code:
Module mainModule
    Sub Main()
        MsgBox("The Main procedure is starting the application.")
        ' Insert call to appropriate starting place in your code.
        MsgBox("The application is terminating.")
    End Sub
End Module


Compile it :

Code:
$ vbnc test.vb


Then run it :

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

Code:
$ mono test.exe

 

What would be the best to get started to monitoring system status using ubuntu in visual basic?


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)
...

 

[출처] https://www.linux.org/threads/visual-basic-application.25998/

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
1195 ePub 의 개요 [전자책 표준] 가을의 곰을... 2009.09.03 30229
1194 ubuntu에서 tcl/tk 설치 가을의 곰을... 2010.08.08 25232
1193 ProGuard - 자바 역컴파일 방지 [1] 가을의 곰을... 2010.01.14 22719
1192 안드로이드 구조분석 wiki file 가을의 곰을... 2010.01.10 22130
1191 C Programming Links 가을의 곰을... 2009.09.02 21174
1190 자바에서 x86 어셈블리로 프로그래밍: x86 Assembly Programming in Java Platform 가을의 곰을... 2011.11.15 20535
1189 ubuntu에서 wxPython 설치하기 가을의 곰을... 2010.08.08 19730
1188 Programatically retrieving data from a website into a database file 졸리운_곰 2017.02.26 18865
1187 ▣ Emacs 사용법 ver 3.0 [1] 가을의 곰을... 2010.01.02 18685
1186 GOF 디자인패턴 file 가을의 곰을... 2009.12.05 17690
1185 emacs 사용법 file 가을의 곰을... 2010.01.03 17418
1184 미래 네트워크 연구 동향 file 가을의 곰을... 2009.12.13 17234
1183 소스인사이트 단축키 (2) 가을의 곰을... 2010.10.11 17003
1182 Android 빌드하여 AVD 생성 및 시뮬에 올리기 file 가을의 곰을... 2010.08.15 16946
1181 기계학습 (머신러닝:Machine Learning) 참고자료 링크 : 머신러닝 : 기계 학습 프로그래밍 자료 졸리운_곰 2014.11.29 16075
1180 Overview of MS Fortran Compiler 가을의 곰을... 2009.09.04 15743
1179 Java GUI 프로그래밍 가을의 곰을... 2011.06.05 15694
1178 < 목표성취의 7단계 > 가을의 곰을... 2009.08.17 15465
1177 JQuery의 힘으로 제작된 17 가지 오픈소스 웹 게임들 가을의 곰을... 2013.01.02 15343
1176 Spring 3 MVC Hello World Example file 가을의 곰을... 2011.11.01 14983
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED