In order for a simulation model to be useful,
output indicating what occurred has to be
produced so that it can be analyzed. The
following kinds of output can be produced
from CSIM:
- Reports
CSIM always collects usage and queueing
information on facilities and storage
units. In addition, it will collect summary
information from tables, qtables, histograms
and qhistograms, if any were created by
the user. All of this information can
be printed via various report statements.
- Model statistics
CSIM collects statistics on the model
itself. This information will be printed
upon request.
- Status reports
Throughout the execution of the model,
CSIM collects information on current status.
This information will be printed via various
status statements.
If no report statement
is specified, CSIM will not generate any
output (although the user can generate
customized output by gathering data through
the various information retrieval statements,
doing calculations on it, if desired,
and printing it).
A partial report can
contain information on just one type of
object or just the header.
Prototype:
void report_hdr(void)
Prototype:
void report_facilities(void)
Prototype:
void report_storages(void)
Prototype:
void report_buffers(void)
Prototype:
void report_classes(void)
Prototype:
void report_events(void)
Prototype:
void report_mailboxes(void)
Prototype:
void report_tables(void)
Prototype:
void report_qtables(void)
Prototype:
void report_meters(void)
Prototype:
void report_boxes(void)
Where:
- report_hdr
prints the header of the report
- report_facilities
prints the usage statistics for all
facilities defined in the model
- report_storages
prints the usage statistics for all
storage units defined in the model
- report_buffers
prints the usage statistics for all
buffers defined in the model
- report_classes
prints the process usage statistics
for all process classes defined in the
model
- report_events
prints the usage statistics for all
events defined in the model and for
which the monitor method has been invoked
- report_mailboxes
prints the usage statistics for all
mailboxes defined in the model and for
which the monitor method has been invoked
- report_tables
prints the summary information for all
tables (with histograms and confidence
intervals)
- report_qtables
prints the summary information for all
qtables (with histograms and confidence
intervals)
- report_meters
prints the summary information for all
meters (with histograms and confidence
intervals)
- report_boxes
prints the summary information for all
boxes (with histograms and confidence
intervals)
Notes:
Details of the contents of these reports
are in the section 19.2,
"CSIM Report Output".
A complete report contains
all of the sub-reports.
Prototype:
void report(void)
Notes:
The sub-reports appear in the order:
- report_hdr
- report_facilities
- report_storages
- report_buffers
- report_classes
- report_events
- report_mailboxes
- report_tables
- report_qtables
- report_meters
- report_boxes
Details of the contents
of these reports are in the section 19.2,
"CSIM Report Output".
Prototype:
void set_model_name(char*
new_name)
Example: set_model_name("prototype
system");
Where:
- name
- is the new name for the simulation
model (quoted string or type char*)
Notes:
name
appears as the model name in the report
header (in report_hdr
and report).
Unless changed by this
statement, the model name will be "CSIM".
The output generated
by the report statements present information
on the simulation run as it has progressed
so far. The sub-reports, comprising the
overall report are:
- Header
- Report on facility
usage (if any facilities were declared)
- Report on storage
usage (if any storage units were declared)
- Report on buffer
usage (if any buffers were declared)
- Report on the process
classes (if more than one process class
(the default process class) has been
declared)
- Report on the monitored
events
- Report on the monitored
mailboxes
- Summary for each
table (with histogram and confidence
interval) declared
- Summary for each
qtable (with histogram and confidence
interval) declared
- Summary for each
meter (with histogram and confidence
interval) declared
- Summary for each
box (with histogram and confidence interval)
declared
The following tables
give a complete description of each of
these sub-reports.
|
Output Heading
|
Meaning
|
| Revision |
CSIM
version number |
| System |
System
simulation was run on, e.g. SUN Sparc |
| Model |
Model
name (see set_model_name) statement |
| Date
and time |
Date
and time that report was printed |
| Ending
Simulation Time |
Total
simulated time |
| Elapsed
Simulation Time |
Simulated
time since last reset |
| CPU
Time Real |
CPU
time used since last report |
| Output Heading |
Meaning
|
|
Facility Summary
|
| facility name |
Name (for a facility set, the index
is appended) |
| service discipline |
Service discipline (when one was
defined) |
| service time |
Mean service time per request |
| util |
Mean utilization (busy time divided
by elapsed time) |
| throughput |
Mean throughput rate (completions
per unit time) |
| queue length |
Mean number of requests waiting
or in service |
| response time |
Mean time at facility (both waiting
and in service) |
|
Counts
|
| completion count |
Number of requests completed |
Notes:
|
Output Heading
|
Meaning
|
|
Storage Summary
|
| storage name |
Name of storage unit |
| size |
Size of storage unit |
|
Means (see note
below)
|
| alloc amount |
Mean amount of storage per allocate
request |
| alloc count |
Number of allocates |
| dealloc amount |
Mean amount of storage per deallocate
requests |
| util |
Average percentage of storage allocated
over time |
| in-que length |
Mean time requests are waiting |
| in-queue time |
Average time a request waits |
Notes:
-
When computing
averages based on the number of requests
for storage, the number of completed
requests is used. Thus, any requests
waiting or in progress when the report
is printed do not contribute to these
statistics.
|
Output Heading
|
Meaning
|
| Buffer
Summary |
| buffer name |
Name of storage unit |
| size |
Size of storage unit |
|
Means (see note
below)
|
| get amt |
Mean amount of space per get |
| get qlen |
Average queue length for gets |
| get resp |
Average response time for gets |
| get count |
Number of gets |
| put amt |
Mean amount of space per put |
| put qlen |
Average queue length for puts |
| put resp |
Average response time for puts |
| put count |
Number of puts |
|
Output Heading
|
Meaning
|
| id |
Process class id |
| name |
Process class name |
| number |
Number of processes belonging to
this class |
| lifetime |
Mean simulated time per process
in this class |
| hold ct |
Mean number of hold statements per
process in this class |
| hold time |
Mean hold time per process in this
class |
| wait time |
Mean wait time per process in this
class (lifetime - holdtime) |
Notes
-
If no process
classes are specified, the report
for the "default" class
(every process begins as a member
of this class)is not provided. If
any process classes are specified,
then the report includes the default
class.
|
Output Heading
|
Meaning
|
|
Event Summary
|
| Event name |
Name of event |
| Number of queue vst |
Total number of entries to queue
queue |
| Avg queue length |
Average length of queue queue |
| Avg time queued |
Average time in queue queue |
| Number of wait vsts |
Total number of entries to wait
queue |
| Avg wait length |
Average length of wait queue |
| Avg time waiting |
Average time in wait queue |
| Number of set ops |
Number of set operations at event |
|
Output Heading
|
Meaning
|
|
Mailbox Summary
|
| Mailbox name |
Name of mailbox |
| Number of proc visits |
Number of process doing receives |
| Process qlength |
Average process queue length |
| Process rspTime |
Average process response time |
| Number of messages |
Number of message sent |
| Message qlength |
Average number of messages in
the mailbox |
| Message rspTime |
Average time for messages in the
mailbox |
|
Output Heading
|
Meaning
|
|
Tables (also
output by report_table(t);)
|
| minimum |
Minimum value recorded |
| maximum |
Maximum value recorded |
| range |
Maximum - minimum |
| observations |
Number of entries in table |
| mean |
Average of values recorded |
| variance |
Variance of values recorded |
| standard deviation |
Square root of variance |
| coefficient of var. |
Standard deviation divided by
the mean |
|
Confidence Intervals
(also output by
report_table(t);)
|
| Observations |
Number of observations used to
compute interval |
| Level |
Probability that interval contains
true mean |
| Confidence interval |
Two forms: Mid-point +/- half-width
Lower limit - upper limit |
| Re. error |
Relative error: half-width divided
by lower limit |
|
Histograms (also
output by report_table(t);)
|
| Lower limit |
Low value for this bucket |
| Frequency |
Number of entries in this bucket |
| Proportion |
Fraction of total number of entries
that are in this bucket |
| Cumulative proportion |
Fraction of total number of entries
that are in this bucket and all
lower buckets |
|
Qtables and
Qhistograms (also output by report_qtable(qt);)
|
| Initial |
Initial state value |
| Final |
Final state value |
| Entries |
Number of entries to states |
| Exits |
Number of exits from states |
| Minimum |
Minimum state value |
| Maximum |
Maximum state value |
| Range |
Range of state values |
| Mean |
Mean state value (Time-weighted) |
| Variance |
Variance of state values |
| Standard deviation |
Square root of variance |
| Coeff. of variation |
Coefficient of variation: standard
deviation divided by mean |
|
Confidence Intervals
(also output by report_qtable(qt);)
|
| Observations |
Number of observation used to
comput interval |
| Level |
Probability that interval contains
true mean |
| Confidence |
Interval Two forms: Mid-point
+/- half-width
Lower limit - upper limit
|
| Rel. error |
Relative error: half-width divided
by lower limit |
|
Histograms (also
output by report_qtable(qt);)
|
| Lower limit |
Low value for this bucket |
| Frequency |
Number of entries in this bucket |
| Proportion |
Fraction of total number of entries
that are in this bucket |
Cumulative proportion |
Fraction of total number of entries
that are in this bucket and all
lower buckets |
Notes:
|
Meters (also output
by report_meter(m);)
|
| Count |
|
| Rate |
|
| Interpassage time statistics |
(see Tables) |
| Confidence Intervals |
(see Tables) |
| Histograms |
(see Tables) |
|
Boxes (also output
by report_box(b);)
|
| Statistics on elapsed
times (see Tables) |
| Confidence Intervals |
(see Tables) |
| Histograms |
(see Tables) |
| Statistics on population
(see Qtables) |
| Confidence Intervals |
(see Qtables) |
| Histograms |
(see Qtables) |
Example:
mdlstat();
-
This report lists:
-
CPU time used
-
Number of events
processed
-
Main memory obtained
via malloc calls
-
Number of malloc
calls
-
Process information:
-
Number of processes
started
-
Number of processes
saved
-
Number of processes
terminated
-
Maximum number
of processes active at one time
-
Information about
storage for run-time stacks
The number of events (events interval
to the operation of the model) can be
retrieved as follows:
Prototype:
void events_processed(void)
Prototype:
void status_processes (void)
Prototype:
void status_next_event_list (void)
Prototype:
void status_events
(void)
Prototype:
void status_mailboxes (void)
Prototype:
void status_facilities (void)
Prototype:
void status_storages
(void)
Where:
-
status_processes
prints the status of all processes
defined in the model
-
status_next_event_list
prints the pending state changes for
processes
-
status_events
prints the status of all events defined
in the model
-
status_mailboxes
prints the status for all mailboxes
defined in the model
-
status_facilities
prints the status of all facilities
defined in the model
-
status_storages
prints the status of all storages
defined in the model
Details of the contents of these reports
are in the sections of this document
that discuss their related objects.
Prototype:
void dump_status
(void)
Notes:
The sub-reports appear in the order:
-
status_processes
-
status_next_event_list
-
status_events
-
status_mailboxes
-
status_facilities
-
status_storages
Each of the above status statements
is callable, so a "customized"
status report can be created.
Next Section
|