Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Introduction
The mail goal of this project is to monitor the Real Time Billing
Service Logic Unit (SLU), Service Data Point (SDP) and Signaling
Gateway Unit (SGU) in the Real Time Billing System (RTBS). The
application.
System monitor
Statistics
Alarm Monitor
Settings
machines, SDP, SLU, and SGU and to find out their information like
which a file named hosts is fetched into local machine using FTP
that contains all the information about the different SDP, SLU and
subscriber database
contains the service logic of the RTBS .It Interfaces with the SGU,
the IVRU, the SDP, and the CCS in order to manage access and use
Mode.
specifically for INAP, CAMEL, and WIN and works in Load Sharing
Mode.
1.1.2 STATISTICS
Table Space
Data Files
Invalid Objects
1.1.4 SETTINGS
Admin Login
Admin Operations
In this module the admin can use the Admin Operations module
is matches then the Admin can make the operations. The username
and password will be saved in the text file. The text file which
TRM
SDP
SLU
SGU
1.1.4.2.1 TRM:
The TRM details are stored in a text file, which contains TRM
IP, username and password. The text file will be in the local
machine.
1.1.4.2.2 SDP:
commands. These commands will be saved in a text file. The text file
1.1.4.2.3 SLU:
commands will be saved in a text file. The text file is stored in the
1.1.4.2.4 SGU:
commands. These commands will be saved in a text file. The text file
monitoring the Real Time Billing System. The auditing team needs to
login each and every machine in the RTBS like, SLU, SDP and SGU.
They have to take care of each machine with proper health check
checking the BHCA in existing system the auditing team has to login
to SDP machine and get the details of calls from call_hist table and
Excel. For checking the disk spaces used by Data Files, Table Space
and Valid and Invalid object the auditing team needs to login in to
disk.
Tool. It gives the features that the earlier was lack off like, the user
call flow in graphical manner so that user can easily make a plan for
utilization by giving the information like, Table Space, Data Files and
1.3.1 Goal:
The main goal of the Real Time Billing System Monitoring Tool
is to monitor the RTBS which helps the health check of the system.
1.3.2 Objectives:
The main objective of the project is to get the features that the
earlier was lack off like, the user no need to login each machine
system.
1.4 Methodology
This model is very useful to get the information (System IP and System
Name) of each system in the RTBS from the TRM machine in quickly and early
during the software life cycle. This model is more flexible – the requirement gets
modified with the different machines except SLU, SDP and SGU. Easier to test
and debug during a smaller iteration like timer, configuration reader. Easier to
manage risk because risky pieces are identified and handled during its iteration,
Since every system has its own draw backs, the draw backs which were
faced are each phase of an iteration is rigid and do not overlap each other and
problems may arise pertaining to system architecture because not all
requirements are gathered up front for the entire software life cycle.
the Real Time Billing System. This project is also used to calculate
the user can easily come to know the details of call history per hour
The System will not support the commands like top –S.
The System will not monitor all the system in the Real Time
Billing System.
Monitor details
Chapter 6: Detailed Design: This chapter presents the table used in the
Release Management Dashboard.
2. Literature Survey
and technology used to develop this tool. The study has focused on
knowledge, ideas, and tools which have been established and used
Powerful database server system for the Comverse line of IN value added
services.
Uses advanced technology to deliver the best possible mass data server
for IN services.
Provides high capacity storage.
Working in Load Sharing Mode.
Sub-system that provides the voice resources for any calls which require
them.
Provide the capabilities to Play voice announcements and Collect
DTMF digits
Operates under full SLU control, according to the service logic
Platform : Java
User Interface : Java Swings
Integrated Development Environment : Net Beans
Database : Oracle
2.2.1 Java
Java (with a capital J) is a high-level, third generation
not C. Knowing how to program in C or, better yet, C++, will certainly
help you to learn Java more quickly, but you don't need to know C to
It has a rich set of widgets. From basic widgets like Buttons, Labels,
settings storage and is also the first IDE to fully support JDK 5.0
features. The NetBeans platform and IDE are free for commercial
2.2.4 ORACLE
Corporation. Larry Ellison and his friends and former co-workers Bob
the Oracle software. The name Oracle comes from the code-name of
employed by Ampex.
and Python.
Functional Requirement defines a function of a software system and how the system
must behave when presented with specific inputs or conditions. These may include calculations,
data manipulation and processing and other specific functionality.
address.
run.
levels
excel sheet
legislation.
time of login.
manner
optimum.
changed environment.
easily understandable.
Before installing the software one needs to make sure that your computer
meets the following requirements as suggested by Microsoft:
4. System Analysis
System Analysis is an activity that encompasses most of the tasks that are
called software system engineering. Analysis is a detailed study of the various
operations performed by a system. Once analysis is completed, the analyst has
firm understanding of what is to be done.
monitoring the Real Time Billing System. The auditing team needs to
login each and every system in the RTBS like, SLU, SDP and SGU.
They have to take care of each machine with proper health check
has to login to SDP machine and get the details of calls from
For checking the disk spaces used by Data Files, Table Space
and Valid and Invalid object the auditing team needs to login in to
disk.
each time user has to login to the different machines and user
Tool. It gives the features that the earlier was lack off like, the user
call flow in graphical manner so that user can easily make a plan for
The proposed system will also take care of disc space utilization by
giving the information like, Table Space, Data Files and Valid and
studies that were carried out to validate the feasibility of this module
or system.
Feasibilities are.
Economic Feasibility
Technical Feasibility
Behavioral Feasibility
Schedule feasibility
the requirements are small. The software requirements are met. The
skill set required developing the project modules are with knowledge
of
Java
Oracle 8i
the system such that at any point of time the user should be able to
project is completed after taking too much time then it may be fail.
The study estimating how long the system will take to develop, and
period.
A use case analysis is the most common technique used to identify the
requirements of a system (normally associated with software/process design) and
the information used to both define processes used and classes (which are a
collection of actors and processes) which will be used both in the use case
diagram and the overall use case in the development or redesign of a software
system or program. The use case analysis is the foundation upon which the
system will be built.
The main purpose of a use case diagram is to show what system functions
are performed for which actor. Roles of the actors in the system can be depicted.
Use case 1
Sequence diagram 1
The user will login by using the user name and password
specified in Configuration application.
Use Case 2:
Sequence diagram 2
The user will login by using the user name and password
specified in Configuration application.
The user sends query to the proper machines and the query is
executed on that machine.
Use Case 3
Sequence Diagram 3
The user will login by using the user name and password
specified in Configuration application.
The user sends query to the proper machines and the query is
executed on that machine.
Use Case 4
Sequence Diagram 4
5. System Design
Interfaces with the SGU, the IVRU, the SDP, and the CCS in order to
manage access and use the resources of these components.
Powerful database server system for the Comverse line of IN value added
services.
Uses advanced technology to deliver the best possible mass data server
for IN services.
Provides high capacity storage.
Working in Load Sharing Mode.
System monitor
Statistics
Alarm Monitor
Settings
machines, SDP, SLU, and SGU and to find out their information like
which a file named hosts is fetched into local machine using FTP
that contains all the information about the different SDP, SLU and
subscriber database
contains the service logic of the RTBS .It Interfaces with the SGU,
the IVRU, the SDP, and the CCS in order to manage access and use
Mode.
specifically for INAP, CAMEL, and WIN and works in Load Sharing
Mode.
5.2.2 STATISTICS
1. CALL_HISTORY_MAIN_A
2. RECHARGE_HISTORY_MAIN_A
3. PS_TRANSACION_MAIN_A
4. OSA_MAIN_A
5. MTR_MAIN_A
Table CALL_HISTORY_MAIN_A
Table RECHARGE_HISTORY_MAIN_A
Table PS_TRANSACION_MAIN_A
Table OSA_MAIN_A
From this table we fetch the number of OSA data /hour in a day
data.
Table MTR_MAIN_A
Table Space
Data Files
Invalid Objects
Invalidation:
5.2.4 SETTINGS
Admin Login
Admin Operations
In this module the admin can use the Admin Operations module
is matches then the Admin can make the operations. The username
and password will be saved in the text file. The text file which
TRM
SDP
SLU
SGU
5.2.4.2.1 TRM:
The TRM details are stored in a text file, which contains TRM
IP, username and password. The text file will be in the local
machine.
5.2.4.2.2 SDP:
commands. These commands will be saved in a text file. The text file
5.2.4.2.3 SLU:
commands will be saved in a text file. The text file is stored in the
5.2.4.2.4 SGU:
commands. These commands will be saved in a text file. The text file
administrator can also add or delete SDP, SGU, and SLU commands
ACTIVITY DIAGRAM 1
Run Configuration
application
Validate input
values
These values will be used in the main application to Login into the
System.
ACTIVITY DIAGRAM 2
The user will login by using the user name and password
provided in the configuration application.
The entered values are checked, if they are valid then only the
user can proceed.
6. Detail Design
This is done using all java classes in our application such that
table named classes with their corresponding details columns as
attribute in the class help to fetch and load corresponding details as
and when required which reduce the money and time complexity
simultaneously.
7. Implementation
Demo to the user: The end user is given a demonstration of the new
system and the feedback is taken from them, and suggestions from them
are considered for further improvements.
Output Design: Computer output is the most important and direct source
of information to the user. Efficient, intelligible, output design should
improve the systems relationships with the user. Here the output design is
made in the form of forms, which is generated based on the user inputs
and the user interaction.
The following are tools to be installed for developing and deploying the
application.
//Automated Telnet Client class is used to run the command and get the
try
telnet.connect(server, 23);
in = telnet.getInputStream();
readUntil("login: ");
write(user);
Thread.currentThread().sleep(500);
write(pass);
// Advance to a prompt
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF,
"Incorrect Login Details or Unable to connect to machine", "Connect",
JOptionPane.ERROR_MESSAGE);
try
//Logger.getLogger(AuditView.class.getName()).log(Level.SEVERE, null,
ex);
String s;
try
TA.append(s);
TA.append("\n");
//Logger.getLogger(AuditView.class.getName()).log(Level.SEVERE, null,
ex);
try
while (true)
sb.append(ch);
if (ch == lastChar)
if (sb.toString().endsWith(pattern))
return sb.toString();
ch = (char) in.read();
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "
Incorrect Login Details2", "Connect", JOptionPane.ERROR_MESSAGE);
return null;
try
FileOutputStream f=new
FileOutputStream("D:/java/output.txt");
while (true)
f.write(ch);
sb.append(ch);
if (ch == lastChar)
if (sb.toString().endsWith(pattern))
return sb.toString();
ch = (char) in.read();
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "
Incorrect Login Details3", "Connect", JOptionPane.ERROR_MESSAGE);
return null;
try
out.println(value);
out.flush();
//System.out.println(value);//Thread.currentThread().sleep(
11000);
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "
Incorrect Login Details4", "Connect", JOptionPane.ERROR_MESSAGE);
try
write(command);
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "
Incorrect Login Details5", "Connect", JOptionPane.ERROR_MESSAGE);
return null;
try
telnet.disconnect();
catch (Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "
Incorrect Login Details6", "Connect", JOptionPane.ERROR_MESSAGE);
8. Testing
software, ensuring that all statements have been testing and on the
functional externals, that is conducting test to uncover error and
ensure that defined input will produce actual results agreed with
required results.
SETTINGS
SYSTEM MONITOR
STATISTICS
ALARM MONITOR
HELP FILE
8.1.1.1 SETTINGS
Admin Login
Admin Operations
In this module the admin can use the Admin Operations module
by entering the username and password. If username and password
is matches then the Admin can make the operations. Here we try
entering the correct username and password to check whether it is
correctly logging in and also provide incorrect values to check
whether the module is barring the user from entering into
application.
TRM
SDP
SLU
SGU
8.1.1.1.2.1 TRM:
8.1.1.1.2.2 SDP:
8.1.1.1.2.3 SLU:
8.1.1.1.2.4 SGU:
8.1.1.3 STATISTICS
This module fetches the information from all the SDPs present
in the RTB System.
Table Space
Data Files
Invalid Objects
Test Status
Expected Actual
case Test Cases Input Data
Results Results (Yes/No)
No.
Login as An error
Error
User with message is
Verify User message
incorrect displayed and
2 Name and displayed, Yes
user name login page is
password login page
and available
available
password again
in SYSTEM
MONITOR
module on
clicking the are present
SDP button
under different
SDP machines
The
commands
must be shown
in SYSTEM
New
Add SLU New MONITOR
5 commands Yes
commands command module on
are present
clicking the
SLU button
under different
SLU machines
The
commands
must be shown
in SYSTEM
New
Add SGU New MONITOR
6 commands Yes
commands command module on
are present
clicking the
SGU button
under different
SGU machines
SDP machines
The
commands
must not be
Selected shown in
command SYSTEM New
8 Delete SLU
from the MONITOR commands Yes
commands
dropdown module on not present
menu clicking the
SLU button
under different
SLU machines
The
commands
must not be
Selected shown in
Delete command SYSTEM New
9 SGU from the MONITOR commands Yes
commands dropdown module on not present
menu clicking the
SGU button
under different
SGU machines
Mouse
click on
the SLU
button All SLU
List all SLU
10 present in machines Listed Yes
machines
the listed in menu
SYSTEM
MONITOR
module
present in
the
SYSTEM
MONITOR
module
Mouse
click on
the SGU
List all button All SGU
12 SGU present in machines Listed Yes
machines the listed in menu
SYSTEM
MONITOR
module
Mouse
Fetch click on Statistics
statistics statistics Fetched in Statistics
13 Yes
for listed tab and GUI window in Fetched
SDPs particular Graph
SDP tab.
The
Check for
Drop a tablespace
14 Tablespace Not listed Yes
tablespace must not be
usage
listed
Check for
The datafile
datafiles Drop a
15 must not be Not listed Yes
under datafile
listed
tablespace
Manually
Check for
make an That object
16 invalid Listed Yes
object as must be listed
objects
invalid
Login Login
operation description
Quality Factors
The factors that affect the quality can be categorized into two
groups.
9. Results
It shows the Datafiles path for each Table Space in the oracle
data base.
It displays the TRM machine login details and the admin can
change the login details of TRM machine.
The above screen shot shows the admin can add a new
command to the tool for monitoring purpose.
10.1 Conclusion:
Need to monitor alarms in real time basis from every RTB units
(alarms will be visible for every 5 mins and get cleared if it not
present in the system)
11. Annexure B
machine.
try
String s;
String[] st1=s.split("\t");
if(st1.length>=2)
String ip1=st1[0];
String username1=st1[1];
String password1=st1[2];
sb.append( username1 );
sb.append( ':' );
sb.append( password1 );
sb.append( '@' );
sb.append( ip1 );
sb.append( '/' );
sb.append( "/../../etc/hosts");
try
URLConnection uc=u.openConnection();
int line;
while((line=br.read())!=-1)
f1.write((char)line);
br.close();
slu.setVisible(true);
sdp.setVisible(true);
sgu.setVisible(true);
catch(Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "Incorrect
Login Details", "Connect", JOptionPane.ERROR_MESSAGE);
slu.setVisible(false);
sdp.setVisible(false);
sgu.setVisible(false);
catch(Exception e)
super(title);
int c1=0,i=0;
JPopupMenu pm = getPopupMenu();
String st=title.substring(0,3);
if(st.equals("slu"))
try
String s;
c1=0;
String[] st1=s.split("\t");
if(st1.length>=2)
st4[c1]=st1[0];
c1++;
freader.close();
catch(Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "SLU
Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
for(i=0;i<c1;i++)
mi2[i]=new JMenuItem(st4[i]);
pm.add(mi2[i]);
if(st.equals("sdp"))
try
String s;
c1=0;
String[] st1=s.split("\t");
if(st1.length>=2)
st4[c1]=st1[0];
c1++;
freader.close();
catch(Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "SDP
Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
for(i=0;i<c1;i++)
mi2[i]=new JMenuItem(st4[i]);
pm.add(mi2[i]);
if(st.equals("sgu"))
try
String s;
c1=0;
String[] st1=s.split("\t");
if(st1.length>=2)
st4[c1]=st1[0];
c1++;
freader.close();
catch(Exception e)
JOptionPane.showMessageDialog(SYS_MONITOR_IF, "SGU
Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
for(i=0;i<c1;i++)
mi2[i]=new JMenuItem(st4[i]);
pm.add(mi2[i]);
for(i1=0;i1<c1;i1++)
mi2[i1].addActionListener(new ActionListener()
String server=null;
String user="",pass="";
String st2=title.substring(0,3);
String getcmd="";
int i;
if(st2.equals("slu"))
for(i=0;i<count;i++)
if(sluname[i].equals(title))
server=sluip[i];
user="sncpuser";
pass="sncpuser";
try
String s;
String[] st1=s.split("\t");
if(st1.length>=2)
if(st1[0].equals(e.getActionCommand()))
getcmd=st1[1];
freader.close();
catch(Exception e1)
JOptionPane.showMessageDialog(SYS_MONITOR_IF,
"SLU Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
break;
if(st2.equals("sdp"))
for(i=0;i<count;i++)
if(sdpname[i].equals(title))
server=sdpip[i];
user="oracle8";
pass="oracle8";
try
String s;
String[] st1=s.split("\t");
if(st1.length>=2)
if(st1[0].equals(e.getActionCommand()))
getcmd=st1[1];
freader.close();
catch(Exception e1)
JOptionPane.showMessageDialog(SYS_MONITOR_IF,
"Sdp Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
break;
if(st2.equals("sgu"))
for(i=0;i<count;i++)
if(sguname[i].equals(title))
server=sguip[i];
user="sguuser";
pass="sguuser";
try
String s;
String[] st1=s.split("\t");
if(st1.length>=2)
if(st1[0].equals(e.getActionCommand()))
getcmd=st1[1];
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 100
Real Time Billing System Monitoring Tool
freader.close();
catch(Exception e1)
JOptionPane.showMessageDialog(SYS_MONITOR_IF,
"SGU Command file not Found", "Menu", JOptionPane.ERROR_MESSAGE);
break;
displayoutput(server,getcmd,user,pass);
TA.setVisible(true);
});
return getPreferredSize();
return getPreferredSize();
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 101
Real Time Billing System Monitoring Tool
if (b != isVisible)
int x = 0;
int y = 0;
x = 0;
y = getHeight();
else
x = getWidth();
y = 0;
getPopupMenu().show(this, x, y);
else
getPopupMenu().setVisible(false);
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 102
Real Time Billing System Monitoring Tool
MB1.removeAll();
for(int i=0;i<count;i++)
MB1.add(createMenu(sluname[i]));
MB1.setBorder(BorderFactory.createMatteBorder(0,0,0,0,Color.BLACK));
MB2.removeAll();
for(int i=0;i<count;i++)
MB2.add(createMenu(sdpname[i]));
MB2.setBorder(BorderFactory.createMatteBorder(0,0,0,0,Color.BLACK));
MB3.removeAll();
for(int i=0;i<count;i++)
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 103
Real Time Billing System Monitoring Tool
MB3.add(createMenu(sguname[i]));
MB3.setBorder(BorderFactory.createMatteBorder(0,0,0,0,Color.BLACK));
return m;
try
count=0;
String str;
int i,j;
char ip1[]=str.toCharArray();
char slu1[]=str.toCharArray();
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 104
Real Time Billing System Monitoring Tool
if(!str.startsWith("#"))
i=str.indexOf("slu");
if(i!=-1)
j=0;int a=0,b=0;
ipc[a++]=ip1[j];
j++;
sluip[count]=chk.trim();
sluc[b++]=slu1[i];
i++;
sluname[count]=chk1.trim();
count++;
catch(Exception e)
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 105
Real Time Billing System Monitoring Tool
IF1.setVisible(false);
machine.
try
Connection con=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.201:1521:sdpa","pps_o
wner","comverse");
catch(Exception e)
{}
if(con==null)
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.2011:1521:sdpb","pps_
owner","comverse");
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 106
Real Time Billing System Monitoring Tool
catch(Exception e)
{}
Statement st=con.createStatement();
int j=0;
while(rs.next())
int i=rs.getInt(1);
Cdata[j++]=i;
j=0;
while(rs.next())
int i=rs.getInt(1);
Rdata[j++]=i;
j=0;
while(rs.next())
int i=rs.getInt(1);
Pdata[j++]=i;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 107
Real Time Billing System Monitoring Tool
j=0;
while(rs.next())
int i=rs.getInt(1);
Mdata[j++]=i;
j=0;
while(rs.next())
int i=rs.getInt(1);
Odata[j++]=i;
con.close();
catch(Exception e)
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 108
Real Time Billing System Monitoring Tool
//super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANT
IALIAS_ON);
int w = getWidth();
int h = getHeight();
// Draw ordinate.
// Draw abcissa.
// Draw labels.
// Ordinate label.
String s = "CALLS";
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 109
Real Time Billing System Monitoring Tool
sy += sh;
// Abcissa label.
s = "HOURS";
float sx = (w - sw)/2;
// Draw lines.
g2.setPaint(Color.green.darker());
g2.setPaint(Color.red);
String s1;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 110
Real Time Billing System Monitoring Tool
if(g1==1)
s1=String.valueOf(Cdata[i]);
if(g1==1)
s1=String.valueOf(data1[i]);
int m=getMax();
int n=m/10;
s1=String.valueOf(00);
int y1=(h-(PAD+PAD))/10;
int y2=h-(PAD);
for(int i=n;i<m-10;i=i+n)
s1=String.valueOf(i);
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 111
Real Time Billing System Monitoring Tool
s1=String.valueOf(m);
max = Cdata[i];
return max;
\\ the below code is used to display the alarm monitor module functions
try
Connection con=null;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 112
Real Time Billing System Monitoring Tool
Class.forName("oracle.jdbc.driver.OracleDriver");
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.120:1521:sdpa","sys","
sys518");
catch(Exception e)
{}
if(con==null)
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.2011:1521:sdpb","sys",
"sys518");
catch(Exception e)
{}
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select
a.TABLESPACE_NAME,a.BYTES bytes_used,b.BYTES
bytes_free,b.largest,round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used from
(select TABLESPACE_NAME,sum(BYTES) BYTES from dba_data_files group by
TABLESPACE_NAME ) a,(select TABLESPACE_NAME, sum(BYTES) BYTES
,max(BYTES) largest from dba_free_space group by TABLESPACE_NAME ) b where
a.TABLESPACE_NAME=b.TABLESPACE_NAME order by ((a.BYTES-
b.BYTES)/a.BYTES) desc");
int i=0;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 113
Real Time Billing System Monitoring Tool
while(rs.next())
str[i]=rs.getString(1);
val[i]=rs.getInt(5);
fval[i]=rs.getFloat(5);
i++;
int l=i;
con.close();
for(i=0;i<l;i++)
for(int j=0;j<2;j++)
if(j==0)
data[i][j]=str[i];
else
data[i][j]=createBar(val[i],fval[i]);
catch(Exception e)
public JT1()
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 114
Real Time Billing System Monitoring Tool
UIManager.put("ProgressBar.selectionBackground", new
ColorUIResource(Color.BLACK));
UIManager.put("ProgressBar.selectionForeground", new
ColorUIResource(Color.BLACK));
getvalueofTabelSpace();
init();
progressBar.setValue(percentDone);
progressBar.setStringPainted(true);
progressBar.setString(Float.toString(f));
if(f<70)
progressBar.setForeground(Color.GREEN);
progressBar.setForeground(Color.ORANGE);
if(f>90)
progressBar.setForeground(Color.RED);
return progressBar;
try
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 115
Real Time Billing System Monitoring Tool
return false;
};
JT.setModel(model);
anHeader.setForeground(new Color(0).BLACK);
anHeader.setAlignmentX(50);
anHeader.setAlignmentY(50);
((JLabel)anHeader.getDefaultRenderer()).setHorizontalAlignment(JLabel.CENTER);
return (JProgressBar)value;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 116
Real Time Billing System Monitoring Tool
try
Connection con=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.120:1521:sdpa","sys","
sys518");
catch(Exception e)
{}
if(con==null)
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.2011:1521:sdpb","sys",
"sys518");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select
tablespace_name,file_name from dba_data_files");
int i=0;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 117
Real Time Billing System Monitoring Tool
while(rs.next())
str[i]=rs.getString(1);
val[i]=rs.getString(2);
i++;
int l=i;
con.close();
for(i=0;i<l;i++)
for(int j=0;j<2;j++)
if(j==0)
data[i][j]=str[i];
else
data[i][j]=val[i];
catch(Exception e)
public JT2()
getvalueofDataFiles();
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 118
Real Time Billing System Monitoring Tool
init();
try
return false;
};
JT1.setModel(model);
anHeader.setForeground(new Color(0).BLACK);
anHeader.setAlignmentX(50);
anHeader.setAlignmentY(50);
((JLabel)anHeader.getDefaultRenderer()).setHorizontalAlignment(JLabel.CENTER);
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 119
Real Time Billing System Monitoring Tool
try
Connection con=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.120:1521:sdpa","sys","
sys518");
catch(Exception e)
{}
if(con==null)
try
con=DriverManager.getConnection("jdbc:oracle:thin:@10.150.12.2011:1521:sdpb","sys",
"sys518");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select
object_name,object_type from all_objects where status like 'INVALID'");
int i=0;
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 120
Real Time Billing System Monitoring Tool
while(rs.next())
str[i]=rs.getString(1);
val[i]=rs.getString(2);
i++;
int l=i;
con.close();
for(i=0;i<l;i++)
for(int j=0;j<2;j++)
if(j==0)
data[i][j]=str[i];
else
data[i][j]=val[i];
catch(Exception e)
public JT3( )
getvalueofInvalidObjects();
init();
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 121
Real Time Billing System Monitoring Tool
try
return false;
};
JT2.setModel(model);
anHeader.setForeground(new Color(0).BLACK);
anHeader.setAlignmentX(50);
anHeader.setAlignmentY(50);
((JLabel)anHeader.getDefaultRenderer()).setHorizontalAlignment(JLabel.CENTER);
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 122
Real Time Billing System Monitoring Tool
12. Bibliography
[2]. Kathy Sierra and Bert Bates, “Head First Java”, First Edition, Oreilly &
Associates Inc, 2003
[3]. Marc Loy, Robert Eckstein, “Java Swings”, Second Edition, Oreilly
& Associates Inc, 2002
[6]. Real Time Billing System Monitoring Tool Architecture and Call Flow
Details
Sir MVIT / Bangalore /1MV08MCA12 / 6th Sem MCA / June 2011 123