Network Monitoring System
Network Monitoring System
A Project report submitted in partial fulfillment of the requirements for the award of the
degree of
BACHELOR OF TECHNOLOGY
IN
Submitted by
Department of CSE
1. DEVRAJ CHATURVEDI
2. MAYANK TIWARI
3. VANSH
ABSTRACT
4 Implementation [24-30]
4.1 Login Window on Server 24
4.2 Server side Interface 25
4.2.1 Remote Task Manager 26
4.2.2 Send Message 27
4.2.3 Execute Command 27
4.2.4 Screen Capturing Module 28
4.2.5 Chatting Module 29
4.2.6 Lock/Unlock Module 30
5 Testing [31-34]
5.1 Test 1 31
5.2 Test 2 31
5.3 Test 3 32
5.4 Test 4 33
5.5 Test 5 33
5.6 Test 6 34
6 Result & Analysis 35
7 Application 36
8 Future enhancement 37
9 Conclusion 38
10 Bibliography 39
11 Project code 40
Chapter 1
INTRODUCTION
Here in this section we will familiarize you with the project with its overview,
introduction and our objective behind choosing this project.
Institutions and Cyber café’s. More improvement can be made in this system if necessary.
Chapter 2
SURVEY OF LITERATURE
Remote Task Manager from SmartLine, Inc is a systems control interface that can
be run from any remote Windows NT/2000/XP computer. It is the leading
enterprise remote control solution for corporate networks.[1]
Remote Task Manager significantly reduces the total cost of network management
in enterprise environments by enabling IT personnel to control tasks, processes,
services, devices, shared resources, events and computer performance over LAN,
WAN and the Internet.[1]
The periodic distribution of new programs, patches and updates represent a large
portion of an administrator’s duties. The challenge is to find the right tool to do
the distribution with a minimum of fuss and muss. It turns out that you can do a
pretty good job at simple software distribution with minimal effort by just doing
remote file copies combined with creating jobs in each remote system to install
the just copied file(s). [2]
Remote Task Manager® (RTM) is a systems control interface that can be run
from any remote Windows NT/2000/XP and Windows Server 2003 computer.
This enables a Systems Administrator to control most aspects of a remote
environment. RTM adds the ability to lock/shutdown/reboot and to create
processes on remote computers. [3]
A clean and simple-to-use user interface offers easy setup wizards and multiple
graphical views of the information. Remote Task Manager is designed to run
under Windows NT/2000/XP. It provides automated support for Install and
Uninstall.
Remote Task Manager even supports remote installs, enabling a Systems
Administrator to set up a service on remote machines without ever having to
physically go to them.
Remote Task Manager supports systems with up to 64 active CPUs. On an SMP
(multiprocessor) system, you can control which CPUs a process will be allowed
to execute on.
The Process Function and the Task Manager allows remote termination and
adjusting of priority.
An Event Viewer lets the Administrator view all events as though they were being
run on the host computer. The Performance Monitor displays a dynamic overview
of the computer's performance (CPU and memory usage).
Remote Task Manager adds the ability to create processes on remote computers.
Remote Task Manager consists of three parts: RTM Service, RTM Manager and
RTM Console.
RTM Service is the core of Remote Task Manager. It is installed on each client
system that you want to manage remotely. RTM Service runs automatically and
provides network access to the client machine while remaining invisible to that
computer’s local users.
RTM Manager is the control interface Systems Administrators use to remotely
manage each network computer that has RTM Service.
RTM Console is similar to RTM Manager except it uses a command line interface
rather than a GUI. RTM Console’s simpler interface works even on Windows
95/98/Me so you can remotely manage Windows NT/2000/XP systems from a
Windows 9x computer.
2.2 Specialty about Screen capturing
Recording methodology
In GDI mode the whole screen is captured in a series of frames then compared for
differences. Changes are stored to disk and compressed in a movie file. GDI
recording is preferable on higher specification machines with older operating
systems, and offers reliable and quality recording.
Capture Modes:
· X Enhanced mode which exploits the full EasyCapture functionality. This is the
default mode.
· XWD mode which is based on the standard xwd program. For simple
requirements this mode offers a faster alternative.
· GL mode (IBM RS/6000 and Silicon Graphics) may be required to capture
windows created by GLbased or other non-X applications.
Capture Types
· A single window, with or without its frame,
· The full screen,
· Any rectangular area of the screen
Capture Options -
beep { true | false }
Issue a beep before and after screen capture. The default value is set in the
initialization file).
-display hostname:server.screen
Specifies the display on which the screen capture is to be performed. If the
display is not specified, the DISPLAY variable is used. If the DISPLAY variable
is not set, the local screen (hostname:0.0) is the default display. -application
window-id
Specifies the window id of the main window of the calling application. The
window id is used if the application is to be hidden during screen capture. When
this option is specified an output file name must also be specified. -delay seconds
This enforces a time delay (in seconds) when capturing. The delay applies if the
graphical user interface of the application overlaps the screen area to be captured,
and it has been specified that this window is hidden during capture. Occasionally,
the system’s event handling may initiate the capture event before the menu has
been hidden, or the desired redraw events have completed; this conflict is
resolved by inducing a delay. The default is supplied in the initialization file). -
capturemode { xe | xwd }
Chatting is one of the attractive facilities available in the Internet. It provides live
(on line) communication between people at different places by typing in the
computer. Now chatting can even be performed by talking and seeing each other.
For this, web cameras and microphones should be connected in both the computers.
Also the software that facilitates chatting should be executed. You know that an e-
mail id and password are required to use email. Similarly, you need a chat id and
password for chatting. As your e-mail id has two parts in the form of user name
@domain, chat id has also the same.
Creating ChatId
The domain name should be known to create chat id. You can get it from your
teacher. Otherwise, you can use the IP address of the computer in the place of
domain name. Password can be decided by you. You can use your name itself at
the user name. Note that no two persons can have the same user name. For example,
If the domain name is myschool.edu, then your chat id will be in the form of
‘myname @myschool.edu’. Once the chat id and password are decided, we can
create the chat id.
Since after the analysis of existing system, it is found that all three features
are not combinly available in existing system, there is a need to combine screen
capturing, chatting and remote task manager.
Also, features present in existing system are platform dependent. Due to the
above shortcomings, there is a need to develop platform independent features.
Existing System:
Monitor all running tasks, processes, services and events on remote computers.
Watch features of running tasks (the handle of the main window, process ID, etc.).
Watch features of running processes (process ID, CPU time, privileges
used, memory and priority).
See which process is associated with a selected task.
See which process is associated with a selected
service. End a selected task correctly.
Terminate a selected process at any time.
Change priority of a selected process.
Control which CPUs the process will be allowed to execute on.
Stop, start, restart, pause and continue any selected service or device.
Change startup parameters of a service or a device (name, account, startup
type, dependencies, etc.).
Change service's repair parameters on Windows
2000/XP. Watch dependent services.
Adjust service's and device's security (permissions, auditing and
owner). Manage shared resources on remote computers.
Clear event logs.
Archive event logs.
Monitor a dynamic overview of the computer's performance (CPU and memory
usage).
Shut down and reboot remote computers.
Create processes on remote computers.
Lock computers remotely.
Chapter 3
DESIGN
Fig3.1:Use Case Diagram
Chapter 4
IMPLEMENTATION
The above window is the first to appear at the server side. The window is named
Admin_Login since it is used by administrator for login purpose.
After the administrator enters the valid username and password, he is granted access
to the next form. By clicking on the Exit button Administrator can close the application.
The above given window is basically used for authentication of administrator. Database of
username and password is stored in oracle on Server side.
The server side interface act as a combined interface for all three modules i.e
Remote Task Manager, Screen Capturing and Chatting. The right hand side of the
window displays the operating system running at each and every client.
The number of clients connected is displayed with the corresponding name and ip
address of the client. The administrator can see the details of the client by clicking on the
respective client’s name and ip address and then clicking on See Details button.
This operation leads to the next window called as Remote Task Manager.
4.2.1 Remote Task Manager Module:
The Remote Task Manager is used to access the task manager of the client. The
name of the task running on the client’s side is enlisted along with its process id.
Two buttons are provided on this window namely, Kill process and Send Message.
By selecting the name of the process of the client that the server wishes to kill and by
clicking on the send message button , the server first sends warning message to the client
to close the respective process. If the client fails to do so, the server can kill the process
by clicking on the Kill Process button. Hence, the client process is closed forcefully.
By clicking on send message button, the server can send any message to client.
By default Hello Message is sent. Server can also send any message to client.
The execute command button is used to execute different commands at the client
side by the server. For example server can open notepad.exe, mspaint.exe or can even
shutdown the client terminal by sending the command Shutdown-s.
4.2.4 Screen Capturing Module:
Screen capturing module has two subparts. They are Get Screen and Dynamic
Capture.
By clicking on Get Screen button, only static image of the client’s terminal is shot.
Whereas using Dynamic Capture, images of client’s terminal is captured dynamically i.e
after a specified time interval the captured image gets updated automatically and is stored
in a folder named after the respective client at server side.
Moreover, for effective use of disk space, after 25 images are stored, the entire
collection is erased and the 26th image is stored at the first location.
4.2.5 Chatting Module:
In Chatting module, a login window is provided at both the client as well as the server
side for authentication purpose. After clicking on the login button the client gets connected
to the server and vice versa.
After successful entry the chatting interface is displayed. The left hand side of the
window displays the name of the logged user. This list gets updated as the number of user
logged on increases. By default Welcome message is sent. The window has three buttons
namely Send, Send2all and Logout.
The lock/unlock window is basically used by administrator while he/she leaves the
terminal. This window provides security by forcing the administrator to enter the username
and password again. Hence, impersonisation can be avoided.
Chapter 5
TESTING
• Test cases
Test cases are designed such that all modules get tested at least by one of
test cases. For successful testing all test cases should pass i.e. outcome should be
as expected.
5.1 Test 1
5.2 Test 2
SERVER_LISTENING
CLIENT_CONNECTIONREQUEST
CLIENT_ERRORMESSAGE
CLIENT_CONNECTED
Module Tested- Establishing connection between
client and server.
5.3 Test 3
5.4 Test 4
5.6 Test 6
Testing has been performed for verification of user name and password, connection
establishment, chatting application, remote task manager, screen capturing and general
utility.
In login form testing the administrator ID and Password are checked. The ID is also
tested for different passwords and vice versa. An error message is displayed unless entered
with correct specified ID and password. After Verifying ID and Password he can get access
to system.
After configuring Network adapter (Ethernet) card with proper IP address settings,
the connectivity in computers in the LAN are tested using PING command. Execute the
server first and then specify the IP address/DNS name in the client side. After checking the
server is listening, sending request for connection from client side and connection is
established between server and client.
After initiating the chat application at client and server side, it is checked that
whether messages are passed correctly. If yes then Chat application was tested
successfully.
In Remote task manager testing new process is made to execute at client’s side and
we see whether the task list at the server side is updated. After this is verified, a warning
message is sent to client to shutdown the process. If the client doesn’t respond to the
warning message, the process is killed by server. In this way we can get required result.
In screen capturing the capturing and actually viewing the remote screen depends
on the performance of the network (LAN). Screen can be captured without any delay as
well as it can be viewed in real-time. Here also we got the required result. Also in general
utility testing the system gives required result.
After testing it was found that the output for given set of input was as expected.
Hence gives the positive result.
Chapter 7
APPLICATION
• Can be used in cyber cafes, hence can help to reduce Cyber Crimes.
• Can be used in practical laboratories of schools and colleges so that a single person
can keep a track of all the students of what he or she is doing without having to visit
each and every terminal.
Chapter 8
FUTURE ENHANCEMENTS
1) Keystroke monitoring :
In this the code can be further modified to capture the keystrokes of remote
console. This will help you in monitoring and preventing illegal user
operations.
2) Webcam monitoring :
Webcam monitoring is useful tool in case of monitoring the users on the
remote terminals or even for surveillance. It can also be successfully
implemented for video conferencing.
4) Session Continuation:
To make provision such that user session can be continued when the power
failure problem occurs.
Chapter 9
CONCLUSION
BIBLIOGRAPHY
{
ht.remove(user); //remove user from hash table
v1.remove(user); //remove user from vector v1
}
public Vector getAllUser()throws RemoteException //return client list of chatting .
{
return v1; // return vector v1
}
public void sendMessage(String to,String msg )throws RemoteException //send msg to
selected client
{
String omsg=(String)ht.get(to);
if(omsg==null)
omsg="";
ht.put(to,omsg+msg); // add old message & new message
}
public String readMsg(String user)throws RemoteException // read msg
{
String msg=(String)ht.get(user); //ckeck availability of user in hashtable.
ht.put(user,"");
return msg; //return msg
}
public void sendToAll(String msg,String sender)throws RemoteException //send msg to
all client
{
for(int i=0;i<v1.size();i++) //send msg to all connected user.
{
String user=(String)v1.get(i); //select user.
if(!user.equals(sender)) // send msg to all clients except him
sendMessage(user,msg); //send msg to user.
}
}
public void run() //execute this function at runtime i.e. run threads.
{
while(true)
try
{
for(int i = 0; i < clientVec.size(); ++i) //check whether client is shutdown or not
{// check whether client is connected or not
InetAddress ia = (InetAddress)clientVec.elementAt(i);
try
{
String host = ia.getHostName(); //get host name of client
InetAddress ia1 = InetAddress.getByName(host);//get Inetaddress of
client using host name
}
catch(Exception e)
{
System.out.println("---------------------------------"+e);
clientVec.remove(ia); // remove client name after shutdown or
disconnected
clientOs.removeElementAt(i); //remove os name
}
}
th.sleep(5000); /thread sleep after particular time interval
}
catch(Exception e)
{
System.out.println(e);
}
}
}
if(ae.getSource()==b2)
{
if(tab.getSelectedRow()>0)
{
int rowind=tab.getSelectedRow();
String sel=(String)tab.getValueAt(rowind,0);
String cmd = sel + ": terminate the process";
clientref.adminMsg(cmd); //send msg to terminate the
process
}
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this,"Error in TabDemo1 is "+e);
}
}
}
}
catch(Exception e)
{
System.out.println("error is "+e);
}
}
public void adminMsg(String msg)throws RemoteException //get msg which
is send by admin.
{
if(msg.equals(null)) //if msg is null never print
return;
else
new Message(msg); // call Message function pass msg as
parameter
}
;public StringBuffer getTasklist()throws RemoteException // get tasklist and
return to Server
{
StringBuffer sbr=new StringBuffer(); //declare ‘sbr’ as string buffer
try
{
Runtime r1=Runtime.getRuntime(); //getruntime environment of client
Process p1=r1.exec("Tasklist");// execute tasklist command
InputStream i1= p1.getInputStream(); //take inputstream of process
p1 in i1
BufferedReader br=new BufferedReader(new
InputStreamReader(i1)); String str="";
while((str=br.readLine())!=null) //read line of buffer reader br in
str {
sbr.append(str+"\n"); // append sbr
}
br.close(); // close
}
catch(Exception e)
{
System.out.println("System Error :"+e);
}
return sbr; //return Tasklist.
}
public void aggCommand(String cmd)throws RemoteException //execute
command which server want
{
try
{
if(cmd.equals(null))
return;
else
{
Runtime r2 = Runtime.getRuntime(); //getruntime environment of
client
Process p2 = r2.exec(cmd); // execute command
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
public byte[] getScreen()throws RemoteException,AWTException,IOException
{ //return current static image to server
try
{
import java.rmi.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
public class LoginForm extends javax.swing.JFrame implements
java.awt.event.ActionListener
{
AdminInt1 ref;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JTextField jTextField1; Font f;
public LoginForm()
{
setTitle("Chatting_Login");
f=new Font("Arial",1,16);
initComponents();
try
{
BufferedReader br = new BufferedReader(new FileReader("name.txt"));
String name = br.readLine();
ref=(AdminInt1)Naming.lookup("rmi://"+name+"/adminserver1");
// read name of server from file store on client
}
catch(Exception e)
{
javax.swing.JOptionPane.showMessageDialog(this,"Error is "+e); //error display in
joptionpane
}
}
public void actionPerformed(java.awt.event.ActionEvent ae)
{ // Performed following action after pressing button
try
{
if(ae.getSource()==jButton2)
{
JOptionPane.showMessageDialog(this,"Exiting");
dispose();
return;
}
if(jTextField1.getText().trim().length()>0)
{
if(jPasswordField1.getText().trim().length()>0)
{
int res=ref.login(jTextField1.getText(),jPasswordField1.getText());
if(res==2)
{
new ChatWin(ref,jTextField1.getText()); // display
chatwindow dispose();
}
else
if(res==0)
{
javax.swing.JOptionPane.showMessageDialog(this,"Invalid
UserName/Password");
jTextField1.setText("");
jPasswordField1.setText("");
jTextField1.requestFocus();
}
else
if(res==1)
{
javax.swing.JOptionPane.showMessageDialog(this,"Already Logged
Inn");
jTextField1.setText("");
jPasswordField1.setText("");
jTextField1.requestFocus();
}
}
else
{
javax.swing.JOptionPane.showMessageDialog(this,"Enter
Password"); jPasswordField1.requestFocus();
}
}
else
{
javax.swing.JOptionPane.showMessageDialog(this,"Enter
Username"); jTextField1.requestFocus();
}
}
catch(Exception e)
{
javax.swing.JOptionPane.showMessageDialog(this,"error is "+e);
}
}//eof act
{
public void windowClosing(WindowEvent we)
{
dispose();
}
}
);
getContentPane().setLayout(null);
getContentPane().setBackground(Color.orange);
jLabel1.setText("Password");
jLabel1.setFont(f);
getContentPane().add(jLabel1);
jLabel1.setBounds(50, 70, 100, 14);
getContentPane().add(jTextField1);
jTextField1.setBounds(160, 30, 120, 20);
jTextField1.setFont(f);
jLabel2.setText("UserName");
jLabel2.setFont(f);
getContentPane().add(jLabel2);
jLabel2.setBounds(50, 30, 100, 14);
getContentPane().add(jPasswordField1);
jPasswordField1.setBounds(160, 70, 120, 20);
jPasswordField1.setFont(f);
jButton1.setText("Login");
jButton1.setFont(f);
getContentPane().add(jButton1);
jButton1.setBounds(80, 150, 80, 28);
jButton2.setText("Exit");
jButton2.setFont(f);
getContentPane().add(jButton2);
jButton2.setBounds(180, 150, 90, 28);
setSize(350,250);
}
public static void main(String args[])
{
LoginForm l1=new LoginForm();
l1.setVisible(true);
}
}
• Message.java
import javax.swing.*;
public class Message extends Thread
{
String msg = "no message"; // assign ‘no message’ string to msg
public Message(String msg) //assign msg
{
this.msg = msg;
start(); // start thread
}
public void run()
{
try
{
JOptionPane.showMessageDialog(null,msg); // display msg
}
catch(Exception e)
{
e.printStackTrace(); // display stack of errors
}
}
}
}
else
if(ae.getSource()==b3) //click for logout
{
ref.logout(user); //call function logout
th1.stop(); // stop thread
th2.stop(); // stop thread
dispose(); // dispose windows
}
}
catch(Exception e)
{ // show errors
JOptionPane.showMessageDialog(this,"Error is "+e);
}
}
}
Thank You