Writing results to database - where is the database sample?

155 views
Skip to first unread message

Skidder

unread,
Feb 3, 2011, 9:20:40 AM2/3/11
to omnetpp
Hi all,

In omnetpp-3.4b2 there was a database example in the samples/
directory, this is not present in omnetpp 4.1.
I want to save my output into a database. I wonder, why has the
database sample disappeared?

My options:
1. move the database code from 3.4b2 to 4.1 (but if there was a good
reason not to include it, I'll probably find out the hard way)
2. parse .sca files offline into database
3. use this method http://www.omnetpp.org/doc/mysql-article/article.html

At the moment I'm a bit puzzled. Does anyone have experience with
results in a database?

Skidder

unread,
Feb 8, 2011, 7:56:32 AM2/8/11
to omnetpp
At the moment I am trying to get the code from 3.4b2 into 4.1 (option
1 above). It does seem some functions in cSimulation and cEnvir are no
longer present.

I'm not really interested in loading config or node placement from a
db, but storing Scalars and Vectors in a database may be very
convenient.

I'll post updates if I find something new.

Skidder

unread,
Feb 9, 2011, 5:28:00 AM2/9/11
to omnetpp
Ok so it seems to be a bit more work than anticipated but most of the
changes are straightforward with some code beautification from 3.4 to
4.0 (e.g. getClassName() in stead of className()). So far no
fundamental issues.

rathod vishal

unread,
Feb 9, 2011, 11:15:01 AM2/9/11
to omn...@googlegroups.com
hi,

when I am running simulation can I import direct database in my simulation?

Vishal Rathod
M.Tech Student
Dharmsinh Desai University.


--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.


Rudolf Hornig

unread,
Feb 9, 2011, 11:54:59 AM2/9/11
to omn...@googlegroups.com
Hi, there was no particular reason leaving it out. It was just the lack of time :)
You should be able port it relatively easy.

Rudolf

Skidder

unread,
Feb 16, 2011, 9:45:18 AM2/16/11
to omnetpp
@Vishal: (copy-paste from database example README:)
- reading the network topology from the database, instead of NED
files;
- getting the configuration (presently in omnetpp.ini) from the
database;
- recording output vectors to the database, instead of omnetpp.vec;
- writing output scalars to the database, instead of omnetpp.sca.

My particular interest lies in outputting to db - and then analysis is
as simple as writing SQL queries. I plan to use one db server on our
cluster with many compute nodes.

@Rudolf: thanks for the reply. At this point I have succeeded in
porting the database example to OMNeT++ 4.1, though because I plan to
use only the cMySQLOutputScalarManager that's where I put most of the
effort.

I now run into trouble with mysql_real_connect returning a mysql error
"Wrong or unknown protocol", also discussed on the Ubuntu forums
( http://ubuntuforums.org/showthread.php?p=10464004#post10464004 ).

If you do happen to have some input regarding the Wrong or unknown
protocol, I would be glad if you could share it (MySQL documentation
only states "Error: 2047 (CR_CONN_UNKNOW_PROTOCOL)" as additional
information).

Skidder

unread,
Feb 17, 2011, 9:23:14 AM2/17/11
to omnetpp
Hi all,

It works. That is to say, I can dump scalar output to a database which
is what I intended to do. So far I did not try reading topology and
configuration or writing scalars or the "recordStatistic" function
(don't need it atm).

I am going to extend the recording of runs and scalars with a new
table with attr entries (these essentially define your whole
experiment) which I think is quite vital.

My aim is to give this code back to the community (some of my students
will start using it soon, and will hopefully expand it). I would
really like to see the database example back in omnetpp :)

greets from University of Twente, the Netherlands,
Martijn

Rudolf Hornig

unread,
Feb 17, 2011, 11:51:22 AM2/17/11
to omn...@googlegroups.com
Thanks. 

If you think it is in a working state, we will gladly review and put it back to the main tree, so all others will see it again in OMNeT++ 4.2...

Rudolf

Muralitharan Krishnan

unread,
Jul 3, 2013, 7:23:42 AM7/3/13
to omn...@googlegroups.com


Hi.. I need the same, Please anyone give a detail steps to write the output into Mysql DB on Ubuntu linux.


Thanks in advance

yc Song

unread,
Aug 13, 2013, 6:55:39 AM8/13/13
to omn...@googlegroups.com
Hello,
        IN  OMNET++ ,I can make it well  for the  example1 and example2 with MySQL .I find  that when as  output into a database,the configpar
 can not work.  Do you find it ? Help for me ! AND  can you make inet in OMNeT++ with MySQL for output into the database?
 thanks ! 
 

在 2011年2月3日星期四UTC+8下午10时20分40秒,Skidder写道:

yc Song

unread,
Aug 13, 2013, 7:01:52 AM8/13/13
to omn...@googlegroups.com
HI,
       I am fine for your succes. But, can you make the fifo example to link the  config and  output (vector/scalar) with mysql at the same time ,when running?
Thanks.
      And, can you make INET with MySQL to work?
        can you help me ?
 Thanks!
 

在 2011年2月17日星期四UTC+8下午10时23分14秒,Skidder写道:
Reply all
Reply to author
Forward
0 new messages