PDA

Visualizza la versione completa : utility per monitorare batteria/ram/partizioni


nik600
03-12-2004, 23:26
ciao a tutti

ve può interessarvi ho fatto un'utility in c++/openGL x la visualizzazione delle seguenti informazioni:

- uptime
- stato batteria
- utilizzo ram
- utilizzo varie partizioni

screenshot:

http://www.criminalteam.org/utenti/nik600/screenshot.jpg

le informazioni disponibili sono molte di più (volendo ci sono anche i mAh della batteria...l'assorbimento...ecc)

cmq questa è la prima release...potete scaricare il codice qui:
http://www.criminalteam.org/utenti/nik600/nik_system.tar


se volete fare commenti/critiche sono graditi!

una nota:
gli aggiornamenti della finestra (quando la spostate o quando la ridimensionate ) sono un po lenti x' le info si aggiornano ogni secondo poi però va tutto ok...


:ciauz:


istruzioni:

scaricate il file nik_system.tar

lo scompattate con

#tar -xvzf nik_system.tar

#cd nik_system

#make

(se non ci sono errori)
#./nik_system


come compilatore utilizzo g++

:ciauz:

mykol
04-12-2004, 16:41
(Knoppix --> Debian Sid)

Ciao,
ho installato g++ con tutti i files richioesti da apt-get, ma quando do il make ottengo:

root@linuxbox:/home/giorgio/software/nick_system/nik_system# make
g++ -c src/nik_system.cc
In file included from src/nik_system.cc:1:
src/classi.h:1:61: GL/glut.h: No such file or directory
src/classi.h:3:61: GL/glu.h: No such file or directory
src/nik_system.cc: In function `void InitGL(int, int)':
src/nik_system.cc:26: error: `gluPerspective' undeclared (first use this
function)
src/nik_system.cc:26: error: (Each undeclared identifier is reported only once
for each function it appears in.)
src/nik_system.cc: In function `void ReSizeGLScene(int, int)':
src/nik_system.cc:43: error: `gluPerspective' undeclared (first use this
function)
src/nik_system.cc: In function `void DrawGLScene()':
src/nik_system.cc:79: error: `glutSwapBuffers' undeclared (first use this
function)
src/nik_system.cc: In function `void keyPressed(unsigned char, int, int)':
src/nik_system.cc:93: error: `glutDestroyWindow' undeclared (first use this
function)
src/nik_system.cc: In function `int main(int, char**)':
src/nik_system.cc:106: error: `glutInit' undeclared (first use this function)
src/nik_system.cc:113: error: `GLUT_RGBA' undeclared (first use this function)
src/nik_system.cc:113: error: `GLUT_DOUBLE' undeclared (first use this
function)
src/nik_system.cc:113: error: `GLUT_ALPHA' undeclared (first use this function)
src/nik_system.cc:113: error: `GLUT_DEPTH' undeclared (first use this function)
src/nik_system.cc:113: error: `glutInitDisplayMode' undeclared (first use this
function)
src/nik_system.cc:116: error: `glutInitWindowSize' undeclared (first use this
function)
src/nik_system.cc:119: error: `glutInitWindowPosition' undeclared (first use
this function)
src/nik_system.cc:122: error: `glutCreateWindow' undeclared (first use this
function)
src/nik_system.cc:125: error: `glutDisplayFunc' undeclared (first use this
function)
src/nik_system.cc:131: error: `glutIdleFunc' undeclared (first use this
function)
src/nik_system.cc:134: error: `glutReshapeFunc' undeclared (first use this
function)
src/nik_system.cc:137: error: `glutKeyboardFunc' undeclared (first use this
function)
src/nik_system.cc:143: error: `glutMainLoop' undeclared (first use this
function)
make: *** [nik_system.o] Error 1

Ovviamente, se lo lancio:

root@linuxbox:/home/giorgio/software/nick_system/nik_system# ./nik_system
nik_system: freeglut_window.c:300: fgOpenWindow: Assertion `window->Window.VisualInfo != ((void *)0)' failed.
Abortito
root@linuxbox:/home/giorgio/software/nick_system/nik_system#

Cosa gli manca ?

nik600
04-12-2004, 16:59
non hai le operGL!

sono delle librerie grafiche

ora cerco un link che ti spiega come installarle... :ciauz:

nik600
04-12-2004, 18:10
ciao

sei sicuro di avere installato tutto g++? ho provato con un slackware 10 installazione di default e compilava... :dhò:

mykol
05-12-2004, 02:49
scusa, ero via, domani provo

tornu
27-03-2006, 23:51
Originariamente inviato da nik600
ciao a tutti

ve può interessarvi ho fatto un'utility in c++/openGL x la visualizzazione delle seguenti informazioni:

- uptime
- stato batteria
- utilizzo ram
- utilizzo varie partizioni

screenshot:

http://www.criminalteam.org/utenti/nik600/screenshot.jpg

le informazioni disponibili sono molte di più (volendo ci sono anche i mAh della batteria...l'assorbimento...ecc)

cmq questa è la prima release...potete scaricare il codice qui:
http://www.criminalteam.org/utenti/nik600/nik_system.tar


se volete fare commenti/critiche sono graditi!

una nota:
gli aggiornamenti della finestra (quando la spostate o quando la ridimensionate ) sono un po lenti x' le info si aggiornano ogni secondo poi però va tutto ok...


:ciauz:


istruzioni:

scaricate il file nik_system.tar

lo scompattate con

#tar -xvzf nik_system.tar

#cd nik_system

#make

(se non ci sono errori)
#./nik_system


come compilatore utilizzo g++

:ciauz:

Buona sera a tutti,
scusate se riprendo questo vecchio post, volevo sapere se qualcuno di voi a provato questa utility.
Io ho provato ad installarla seguendo le istruzioni ma ottengo questo errore:
[root@AcerNB nik_system]# make
g++ -c src/nik_system.cc
In file included from src/nik_system.cc:1:
src/classi.h:1:61: error: GL/glut.h: No such file or directory
src/classi.h:2:59: error: GL/gl.h: No such file or directory
src/classi.h:3:57: error: GL/glu.h: No such file or directory
src/classi.h:4:20: error: GL/glx.h: No such file or directory
src/classi.h:23: error: ISO C++ forbids declaration of 'GLubyte' with no type
src/classi.h:23: error: expected ';' before '*' token
src/classi.h:24: error: 'GLuint' does not name a type
src/classi.h:25: error: 'GLuint' does not name a type
src/classi.h:26: error: 'GLuint' does not name a type
src/classi.h:27: error: 'GLuint' does not name a type
src/classi.h:54: error: 'GLuint' does not name a type
src/classi.h:61: error: 'GLint' has not been declared
src/classi.h:61: error: 'GLint' has not been declared
src/nik_system.cc: In function 'void InitGL(int, int)':
src/nik_system.cc:17: error: 'glClearColor' was not declared in this scope
src/nik_system.cc:18: error: 'glClearDepth' was not declared in this scope
src/nik_system.cc:19: error: 'GL_LESS' was not declared in this scope
src/nik_system.cc:19: error: 'glDepthFunc' was not declared in this scope
src/nik_system.cc:20: error: 'GL_DEPTH_TEST' was not declared in this scope
src/nik_system.cc:20: error: 'glEnable' was not declared in this scope
src/nik_system.cc:21: error: 'GL_SMOOTH' was not declared in this scope
src/nik_system.cc:21: error: 'glShadeModel' was not declared in this scope
src/nik_system.cc:23: error: 'GL_PROJECTION' was not declared in this scope
src/nik_system.cc:23: error: 'glMatrixMode' was not declared in this scope
src/nik_system.cc:24: error: 'glLoadIdentity' was not declared in this scope
src/nik_system.cc:26: error: 'GLfloat' was not declared in this scope
src/nik_system.cc:26: error: 'gluPerspective' was not declared in this scope
src/nik_system.cc:28: error: 'GL_MODELVIEW' was not declared in this scope
src/nik_system.cc: In function 'void ReSizeGLScene(int, int)':
src/nik_system.cc:38: error: 'glViewport' was not declared in this scope
src/nik_system.cc:40: error: 'GL_PROJECTION' was not declared in this scope
src/nik_system.cc:40: error: 'glMatrixMode' was not declared in this scope
src/nik_system.cc:41: error: 'glLoadIdentity' was not declared in this scope
src/nik_system.cc:43: error: 'GLfloat' was not declared in this scope
src/nik_system.cc:43: error: 'gluPerspective' was not declared in this scope
src/nik_system.cc:44: error: 'GL_MODELVIEW' was not declared in this scope
src/nik_system.cc: In function 'void DrawGLScene()':
src/nik_system.cc:50: error: 'GL_COLOR_BUFFER_BIT' was not declared in this scope
src/nik_system.cc:50: error: 'GL_DEPTH_BUFFER_BIT' was not declared in this scope
src/nik_system.cc:50: error: 'glClear' was not declared in this scope
src/nik_system.cc:51: error: 'glLoadIdentity' was not declared in this scope
src/nik_system.cc:52: error: 'glTranslatef' was not declared in this scope
src/nik_system.cc:79: error: 'glutSwapBuffers' was not declared in this scope
src/nik_system.cc: In function 'void keyPressed(unsigned char, int, int)':
src/nik_system.cc:93: error: 'glutDestroyWindow' was not declared in this scope
src/nik_system.cc: In function 'int main(int, char**)':
src/nik_system.cc:106: error: 'glutInit' was not declared in this scope
src/nik_system.cc:113: error: 'GLUT_RGBA' was not declared in this scope
src/nik_system.cc:113: error: 'GLUT_DOUBLE' was not declared in this scope
src/nik_system.cc:113: error: 'GLUT_ALPHA' was not declared in this scope
src/nik_system.cc:113: error: 'GLUT_DEPTH' was not declared in this scope
src/nik_system.cc:113: error: 'glutInitDisplayMode' was not declared in this scope
src/nik_system.cc:116: error: 'glutInitWindowSize' was not declared in this scope
src/nik_system.cc:119: error: 'glutInitWindowPosition' was not declared in this scope
src/nik_system.cc:122: error: 'glutCreateWindow' was not declared in this scope
src/nik_system.cc:125: error: 'glutDisplayFunc' was not declared in this scope
src/nik_system.cc:131: error: 'glutIdleFunc' was not declared in this scope
src/nik_system.cc:134: error: 'glutReshapeFunc' was not declared in this scope
src/nik_system.cc:137: error: 'glutKeyboardFunc' was not declared in this scope
src/nik_system.cc:143: error: 'glutMainLoop' was not declared in this scope
make: *** [nik_system.o] Error 1

potete darmi qualche spiegazione?
Grazie

cacao74
28-03-2006, 00:43
Bravo nik600!

Scaricato, compilato ed eseguito al volo su slack current.
Riporto i passaggi per chi avesse qualche problemino:


[cacao74@tweety src]$ wget http://www.criminalteam.org/utenti/nik600/nik_system.tar
[cacao74@tweety src]$ tar xf nik_system.tar
[cacao74@tweety src]$ cd nik_system/
[cacao74@tweety nik_system]$ make
g++ -c src/nik_system.cc
g++ -c src/batteria.cc
g++ -c src/carattere.cc
g++ -c src/texture.cc
g++ -c src/ram.cc
g++ -c src/uptime.cc
g++ -c src/partizione.cc
g++ -c src/hdd.cc
g++ -Wall -I/usr/include -o nik_system -L/usr/X11R6/lib
nik_system.o batteria.o carattere.o texture.o ram.o
uptime.o partizione.o hdd.o -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm
[cacao74@tweety nik_system]$ ./nik_system

Vista l'ora, non sono propenso a guidizi/critiche costruttive, qualora ce ne fosse il bisogno. :D

ciao

edit: mi accorgo ora che il thread è di molti mesi fa...

tornu
28-03-2006, 22:27
Buona sera a tutti,
Inanzitutto mi scuso se ho riaperto questo vecchio post in maniera confusa.
A cacao74 faccio presente che ho eseguito gli stessi tuoi passaggi ma ho ottenuto l'errore che ho inserito nel mio post precedente; se potessi darmi qualche consiglio ti sarei grato.
Grazie

Mandriva 2006

cacao74
29-03-2006, 00:42
a prima vista, sembra assente il supporto per OpenGL

tornu
31-03-2006, 20:55
Supporto OpenGL installato correttamente, almeno credo per quanto concerne le mie conoscenze.
Altri suggerimenti? Grazie

S.O.: Mandriva 2006

Loading