Skip to main content

Posts

Showing posts from February, 2012

Simple Monitoring Console

Hi All, Find the below simple user console program what i have written in "C" @Linux. It might be helpful to you in monitoring. Here is the snippet of code, for your reference. #include"stdio.h" #include"stdlib.h" #include"ncurses.h" #include"string.h" #include "sys/types.h" #include "unistd.h" #include "sys/wait.h" void init() { int i,j; for(i=1;i<=25;i++) { printw("\n%3d-|",50-i*2); } printw("\n%3s"," "); for(j=1;j<=32;j++) { printw("%3s","-"); } printw(" "); printw("\n\n\n"); printw("%5s"," "); for(j=1;j<=94;j++) { printw("="); } printw("\n"); printw("%60s","TOP 10 CPU PROCESSES"); printw("\n"); printw("%5s"," "); for(j=1;j<=94;j++) printw("-"); mvprintw(1,110,""); for(j=1;j<=40;j++) printw("=...

File Retention Scripts For Windows

Hi All, Here's the script you can run in windows for file retention. For this, we need "7z" module to be installed in windows. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ECHO @OFF C: CD\ set S1_WAL_FILES="E:\Wal_Archive_Sms1" set S2_WAL_FILES="E:\S1_Share\Wal_Archive_Sms2" REM SMS1 Wal files Backup forfiles /p %S1% /m * -d -4 -c "cmd /c 7z a -t7z E:\Wal_Backup\Wal_Archive_S1_BKP_%date:~-10,2%_%date:~-7,2%_%date:~-4,4%.7z \"@fname\"" >null REM SMS2 Wal files Backup forfiles /p %S2_WAL_FILES% /m * -d -4 -c "cmd /c 7z a -t7z E:\Wal_Backup\Wal_Archive_S2_BKP_%date:~-10,2%_%date:~-7,2%_%date:~-4,4%.7z \"@fname\"" >null REM SMS1 WAL Retention forfiles /p %S2_WAL_FILES% /m * -d -4 -c "cmd /c del \"@fname"\" REM SMS2 WAL Retention forfiles /p %S2_WAL_FILES% /m * -d -4 -c "cmd /c del \"@fname"\" +++++++++++++++++++++++++++++++++...