LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-23-2017, 10:28 AM   #1
JohnCherry
LQ Newbie
 
Registered: Mar 2017
Location: Athens, Greece
Distribution: Opensuse Leap, Manjaro Linux
Posts: 10

Rep: Reputation: Disabled
Xgraph: Problem -> Segmentation fault (core dumped)


Hello,

My name is Ioannis Kerasiotis and I am student of National Technical University of Greece. I study Electrical & Computer Engineering and my field is Computer and Network Engineering. I was asked to use ns2 for doing a homework at Lesson "Communication Networks"

Recently, I installed ns2, nam and xgraph on my pc (I use Manjaro Linux OS) and I have a problem running xgraph. I compile my tcl file (-> ns *.tcl) and I normally display it on Nam (nam *.nam) but when I want to use xgraph I have the Problem below:

->xgraph *.tr
Parameter LabelFont: can't translate `dejavu-10' into a font (defaulting to `fixed')
Segmentation fault (core dumped)

May you help me to solve my problem? I am looking for your answers! I hope you can find me a Solution!

Regards,
Ioannis

PS: Congratulations about your job!
 
Old 03-23-2017, 10:44 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Welcome to LQ.
Quote:
$ xgraph *.tr
Xgraph cannot run regular trace files !
Please have a look into xgraph-12.2/examples/files.xg to know the required formatting.

There are many examples.tcl generating output files for Xgraph, some have have suffix.tr :
Xgraph will accept any suffix or no suffix when the file has the right formatting.

Latest is xgraph_ns2-files-tcl_07.2016.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-
 
Old 03-23-2017, 11:18 AM   #3
JohnCherry
LQ Newbie
 
Registered: Mar 2017
Location: Athens, Greece
Distribution: Opensuse Leap, Manjaro Linux
Posts: 10

Original Poster
Rep: Reputation: Disabled
I compiled a simple example with ns and with nam I hadn't any problem. But I can't launch xgraph

My TCL Source Code is above:

Code:
set ns [new Simulator]


set nf [open lab1.nam w]
$ns namtrace-all $nf

set xf [open lab1.tr w]


proc record {} {
	global sink xf
	set ns [Simulator instance]
	set time 0.12
	set bw [$sink set bytes_]
	set now [$ns now]
	puts $xf "$now [expr ((($bw/$time)*8)/1000000)]"
	$sink set bytes_ 0
	$ns at [expr $now+$time] "record"
}


proc finish {} {
	global ns nf xf
	$ns flush-trace
	close $nf
	close $xf
	exit 0
}


set n0 [$ns node]
set n1 [$ns node]


$ns duplex-link $n0 $n1 4Mb 10ms DropTail


set agent0 [new Agent/UDP]
$agent0 set packetSize_ 1500
$ns attach-agent $n0 $agent0

set traffic0 [new Application/Traffic/CBR]
$traffic0 set packetSize_ 1500
$traffic0 set interval_ 0.01
$traffic0 attach-agent $agent0

set sink [new Agent/LossMonitor]
$ns attach-agent $n1 $sink
$ns connect $agent0 $sink



$ns at 0.0  "record"
$ns at 2.0  "$traffic0 start"
$ns at 10.0 "$traffic0 stop"
$ns at 12.0 "finish"


$ns run
It's a very simple example. Where was I wrong?

Last edited by JohnCherry; 03-23-2017 at 05:06 PM. Reason: Add Code Tags
 
Old 03-23-2017, 04:02 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #3 : Please edit post #3 to use code tags >>> [code]code text[/code]

Xgraph : Please read "Creating Output Files for Xgraph"
http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html

About your code : No issues here.
$ xgraph lab1.tr -bg white : OK, see the attached image.

? Which OS are you using ? a) $ uname -m b) $ cat /etc/issue
-
Attached Thumbnails
Click image for larger version

Name:	screen22898.jpg
Views:	68
Size:	30.5 KB
ID:	24582  
 
Old 03-23-2017, 04:32 PM   #5
JohnCherry
LQ Newbie
 
Registered: Mar 2017
Location: Athens, Greece
Distribution: Opensuse Leap, Manjaro Linux
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
? Which OS are you using ? a) $ uname -m b) $ cat /etc/issue
-
I am using Manjaro Linux.

When I use command
Attached Thumbnails
Click image for larger version

Name:	17431814_10206730996712672_2060093735_o.jpg
Views:	69
Size:	69.6 KB
ID:	24584  

Last edited by JohnCherry; 03-23-2017 at 04:53 PM. Reason: Add Content
 
Old 03-23-2017, 05:10 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #5.
Quote:
When I use command
Assume $ xgraph lab1.tr : OK, your image shows the same result as I got ?
So what's the problem ?
1) Parameter LabelFont: can't translate `dejavu-10' into a font (defaulting to `fixed')
... can be ignored. Happens with several OSīs. Absolutely harmless.

2) "Segmentation fault" : Can be ignored if it happens after the wanted result is achieved.

-

Last edited by knudfl; 03-23-2017 at 05:12 PM.
 
  


Reply

Tags
ns2, xgraph


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault (core dumped) mohammad taqy bayat Linux - Newbie 3 08-25-2014 02:10 AM
Segmentation fault (core dumped) mezyana Linux - Newbie 1 05-18-2014 03:52 PM
Segmentation fault (core dumped) sirjase Programming 8 12-18-2013 03:40 AM
Segmentation fault (core dumped) Khaled ELmishad Programming 1 06-16-2012 11:13 AM
Segmentation fault (core dumped) hasanaydin Linux - General 0 03-27-2002 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration