Discussion:
[Contiki-developers] What is Difference Between The Energest and PowerTrace
Jhon James
2013-08-24 16:21:08 UTC
Permalink
Dear all,


Can anyone tell me the difference between the Energest and Powertrace? Do
these 2 serve the same purpose? I have used the powertrace and I can get
the prints but don't know how to manuplate them to get the power
results/grap from the log file. Is there any tool in the contiki where I
can input that file and see what is the power being consumed?

Also is there any Energest tool to input the print results of the Energest
and get the results with labs in Contiki tools? Which one is more accurate ?


Regard's
David Kopf
2013-08-24 19:13:33 UTC
Permalink
Energest uses wraparound macros to count the number of rtimer ticks in each
state - high and low power cpu, radio rx and tx, led on, and whatever else
the platform wants to keep track of (time spent doing CCAs). The power
consumption of a state times the time spent in that state is the overall
energy used by that state; divide by the number of seconds since boot and
you get the average power for that state. The powertrace and compower
routines use energest along with a periodic difference of the rtimer ticks
to get average power over a shorter period of time or for particular network
modes. The energy calculations are platform and cpu dependent so there is no
overall routine to print the results.

However the fraction of time spent in each state can be calculated
independent of platform. Webserver-nano shows that on the status page in
httpd-cgi.c:

static unsigned short
generate_stats(void *arg)
{
uint16_t numprinted;
uint16_t h,m,s;
uint8_t p1,p2;
uint32_t seconds=clock_seconds();
static const char httpd_cgi_sensor4[] HTTPD_STRING_ATTR = "<em>CPU time
(ENERGEST):</em> %02u:%02u:%02u (%u.%02u%%)\n";
static const char httpd_cgi_sensor10[] HTTPD_STRING_ATTR = "<em>Radio
(ENERGEST):</em> Tx %02u:%02u:%02u (%u.%02u%%) ";
static const char httpd_cgi_sensor11[] HTTPD_STRING_ATTR = "Rx
%02u:%02u:%02u (%u.%02u%%)\n";
sl=energest_total_time[ENERGEST_TYPE_CPU].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor4, h,m,s,p1,p2);

sl=energest_total_time[ENERGEST_TYPE_TRANSMIT].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor10, h,m,s,p1,p2);

sl=energest_total_time[ENERGEST_TYPE_LISTEN].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor11, h,m,s,p1,p2);


-----Original Message-----
From: Jhon James
Sent: Saturday, August 24, 2013 12:21 PM
To: contiki-***@lists.sourceforge.net
Subject: [Contiki-developers] What is Difference Between The Energest
andPowerTrace


Dear all,


Can anyone tell me the difference between the Energest and Powertrace? Do
these 2 serve the same purpose? I have used the powertrace and I can get the
prints but don't know how to manuplate them to get the power results/grap
from the log file. Is there any tool in the contiki where I can input that
file and see what is the power being consumed?

Also is there any Energest tool to input the print results of the Energest
and get the results with labs in Contiki tools? Which one is more accurate ?


Regard's
Jhon James
2013-08-27 13:46:12 UTC
Permalink
On Sun, Aug 25, 2013 at 10:02 PM, <
Send Contiki-developers mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/contiki-developers
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Contiki-developers digest..."
1. Re: What is Difference Between The Energest andPowerTrace
(David Kopf)
2. DIS messages absent (erij tounsi)
3. Re: DIS messages absent (David Kopf)
4. MobiCom 2013: Registration Deadline in 1 Week & Full Program
Now Available (Pei Zhang)
5. CFP: ENSSYS and SenseMine 2013 (co-located with SenSys'13)
(SenSys Publicity)
----------------------------------------------------------------------
Hello David,
Thanks for such a detailed reply. I am trying to add the powertrace
or Energest to the border-router code. I added power trace sucessfully and
can get the log of the captured data in the file, but i want to ask that
how we can manuplate the result. For Energest I am trying to figure out
where to insert the code to measure any uptime for router and then get
power results. If you can give clue about this, I will appreciate. Still
thanks a lot regarding the explaination of previous question.

Regard's
Message: 1
Date: Sat, 24 Aug 2013 15:13:33 -0400
Subject: Re: [Contiki-developers] What is Difference Between The
Energest andPowerTrace
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Energest uses wraparound macros to count the number of rtimer ticks in each
state - high and low power cpu, radio rx and tx, led on, and whatever else
the platform wants to keep track of (time spent doing CCAs). The power
consumption of a state times the time spent in that state is the overall
energy used by that state; divide by the number of seconds since boot and
you get the average power for that state. The powertrace and compower
routines use energest along with a periodic difference of the rtimer ticks
to get average power over a shorter period of time or for particular
network
modes. The energy calculations are platform and cpu dependent so there is
no
overall routine to print the results.
However the fraction of time spent in each state can be calculated
independent of platform. Webserver-nano shows that on the status page in
static unsigned short
generate_stats(void *arg)
{
uint16_t numprinted;
uint16_t h,m,s;
uint8_t p1,p2;
uint32_t seconds=clock_seconds();
static const char httpd_cgi_sensor4[] HTTPD_STRING_ATTR = "<em>CPU time
(ENERGEST):</em> %02u:%02u:%02u (%u.%02u%%)\n";
static const char httpd_cgi_sensor10[] HTTPD_STRING_ATTR = "<em>Radio
(ENERGEST):</em> Tx %02u:%02u:%02u (%u.%02u%%) ";
static const char httpd_cgi_sensor11[] HTTPD_STRING_ATTR = "Rx
%02u:%02u:%02u (%u.%02u%%)\n";
sl=energest_total_time[ENERGEST_TYPE_CPU].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor4, h,m,s,p1,p2);
sl=energest_total_time[ENERGEST_TYPE_TRANSMIT].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor10, h,m,s,p1,p2);
sl=energest_total_time[ENERGEST_TYPE_LISTEN].current/RTIMER_ARCH_SECOND;
h=(10000UL*sl)/seconds;p1=h/100;p2=h-p1*100;h=sl/3600;s=sl-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted,
uip_mss()-numprinted, httpd_cgi_sensor11, h,m,s,p1,p2);
-----Original Message-----
From: Jhon James
Sent: Saturday, August 24, 2013 12:21 PM
Subject: [Contiki-developers] What is Difference Between The Energest
andPowerTrace
Dear all,
Can anyone tell me the difference between the Energest and Powertrace? Do
these 2 serve the same purpose? I have used the powertrace and I can get
the
prints but don't know how to manuplate them to get the power results/grap
from the log file. Is there any tool in the contiki where I can input that
file and see what is the power being consumed?
Also is there any Energest tool to input the print results of the Energest
and get the results with labs in Contiki tools? Which one is more accurate
?
Regard's
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Contiki-developers mailing list
https://lists.sourceforge.net/lists/listinfo/contiki-developers
------------------------------
Message: 2
Date: Sat, 24 Aug 2013 20:25:31 +0100
Subject: [Contiki-developers] DIS messages absent
To: Contiki developer mailing list
Content-Type: text/plain; charset="iso-8859-1"
Hello everybody,
Is it normal that in a testbed of 15 motes (TelosB) running RPL, DIS
messages are completely absent in the nodes outputs?
Thank you in advance for your answers.Erij
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 3
Date: Sat, 24 Aug 2013 15:43:55 -0400
Subject: Re: [Contiki-developers] DIS messages absent
To: "Contiki developer mailing list"
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Nodes should output a couple of DIS at boot, after the mesh forms then only
if the dag is lost, unless you have defined RPL_DIS_SEND to be zero.
$grep -R dis_output *
$grep -R RPL_DIS_SEND
#ifdef RPL_DIS_SEND
next_dis++;
if(rpl_get_any_dag() == NULL && next_dis >= RPL_DIS_INTERVAL) {
next_dis = 0;
dis_output(NULL);
}
#endif
-----Original Message-----
From: erij tounsi
Sent: Saturday, August 24, 2013 3:25 PM
To: Contiki developer mailing list
Subject: [Contiki-developers] DIS messages absent
Hello everybody,
Is it normal that in a testbed of 15 motes (TelosB) running RPL, DIS
messages are completely absent in the nodes outputs?
Thank you in advance for your answers.
Erij
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Contiki-developers mailing list
https://lists.sourceforge.net/lists/listinfo/contiki-developers
------------------------------
Message: 4
Date: Sat, 24 Aug 2013 19:34:41 -0700
Subject: [Contiki-developers] MobiCom 2013: Registration Deadline in 1
Week & Full Program Now Available
Content-Type: text/plain; charset="us-ascii"
Dear Colleagues,
We're happy to inform you that the program of ACM MobiCom 2013, the 19th
International Conference on Mobile Computing and Networking is now
available at
http://www.sigmobile.org/mobicom/2013/program.html
In addition, we would like to remind you that the deadline for discounted
early registration is in one week, on August 30th, 2013.
ACM MobiCom 2013, the Annual International Conference on Mobile Computing
and Networking, is the nineteenth in a series of annual conferences
sponsored by ACM SIGMOBILE dedicated to addressing the challenges in the
areas of mobile computing and wireless and mobile networking. The MobiCom
conference series serves as a highly selective, premier international forum
addressing networks, systems, algorithms, and applications that support
mobile computers and wireless networks. In addition to the regular
conference program, MobiCom 2013 will include a set of workshops, panels,
research demonstrations, and a poster session that includes the ACM Student
Research Competition. This year, MobiCom is also introducing a new mobile
app competition and a new session of invited industry presentations.The
conference will be held in Miami, Florida, September 30-October 4, 2013.
We hope to see you there.
Apologies for the multiple postings.
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 5
Date: Sun, 25 Aug 2013 10:02:24 -0700
Subject: [Contiki-developers] CFP: ENSSYS and SenseMine 2013
(co-located with SenSys'13)
Content-Type: text/plain; charset="iso-8859-1"
[ ** Please excuse any duplicates you may receive ** ]
Note: Submission deadlines fast approaching.
===============================================================
ENSSYS 2013
First International Workshop on Energy-Neutral Sensing Systems
in conjunction with SenSys 2013
November 14, 2013,
Rome, Italy
Submission: August 30, 2013
Notification: October 04, 2013
Camera-ready: October 18, 2013
Davide Brunelli, Uni. Trento, Italy
Geoff Merrett, Uni. Southampton, UK
Davide Brunelli. Uni. Trento, Italy
Geoff Merrett, Uni. Southampton, UK
Pai H. Chou, Uni. California, Irvine, USA
Emanuael Popovici, Uni. Cork, Ireland
Christian Renner, Uni. L??beck, Germany
Paul Wright, UC Berkeley, USA
Yogesh Ramadass, Texas Instruments, USA
Paul Mitcheson, Imperial College, UK
Aravind Kailas, Uni. NC Charlotte, USA
Further Details: http://www.enssys.org/
===============================================================
===============================================================
SenseMine 2013
First International Workshop on Sensing and Big Data Mining
in conjunction with SenSys 2013
November 14, 2013
Rome, Italy
Submission deadline: September 6, 2013, 11:59 PM EDT
Notification of acceptance: October 10, 2013
Emiliano Miluzzo, AT&T Labs Research
Deepak S. Turaga, IBM Research
Deborah Estrin (Cornell)
Andrew Campbell (Dartmouth College)
Yanyong Zhang (Rutgers University)
Marco Conti (CNR Italy)
Immanuel Schweizer (Technische Universitat Darmstadt)
Jing Gao (SUNY Buffalo)
Wei Fan (Huawei)
Tarek Abdelzahar (UIUC)
Charu Aggarwal (IBM Research)
Further Details: http://www2.research.att.com/sensemine2013/index.html
===============================================================
------------------------------
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
------------------------------
_______________________________________________
Contiki-developers mailing list
https://lists.sourceforge.net/lists/listinfo/contiki-developers
End of Contiki-developers Digest, Vol 87, Issue 65
**************************************************
Loading...