GithubHelp home page GithubHelp logo

Comments (6)

mesld avatar mesld commented on July 23, 2024 1

Hi @HongyuHe,

Thanks for your response!

The following seems to have worked in home directory:

  1. I ran the script init_system.sh
  2. 'sudo energat -basepower'
  3. 'sudo energat -check'
  4. 'sudo /bin/python3 /local/home/./energat/first.py'

The output was the following:
image
image
image
image

And there was no interrupt this time. Is this the correct output?

Also in the final results, what is the 'p' in 'pkg'?

Thank you and have a good evening :)

from energat.

HongyuHe avatar HongyuHe commented on July 23, 2024

Hi @mesld,

Thanks for the feedback!

First, when you are using the python API, you don't need to run energat from the command line, since it's been used as a library already, and the energy traces will be saved to the ./xyz_energy.csv. In other words, you either use it directly in your program OR attach it to any running processes from the command line.

In addition, the reason you can't find the PID of first.py is probably because the application is too short and has finished. Otherwise, you can do a ps or top on linux to get the PID of that python process. The PID/TID logged out in the terminal is of the energat itself and has nothing to do with your application.

Lastly, for the base power estimation, currently you have to use energat in the same directory as the one in which you measured the base power. Otherwise, it can't find the baseline_power.json anymore. Alternatively, you can pass the file location via the --basefile flag from the command line (see). I will improve this part later to make it remember the absolute path to the record file.

Hope this clears things up a bit.

from energat.

mesld avatar mesld commented on July 23, 2024

Hi @HongyuHe,

Thank you for your answer and your help!

I am using energat directly in my program.

Indeed, I modified the application a bit (changed the range of the for loop from 100 to 1000). You can see the output in the pictures after Steps.
I am not sure whether energat automatically notices the PID of the application. You can see on the picture that it still displays "Baseline power hasn't been estimated", even though I did "sudo energat -basepower" right before, followed by "sudo energat -check".

Regarding the issue with the directory, I now have removed the directory and placed directly the python application in the energat directory.

Steps:

  1. Directly in home (NOT in the energat directory): sudo energat -basepower
  2. In home: sudo energat -check
  3. In home: /bin/python3 /local/home/./energat/first.py
    This is the output:
    Slide1
    Slide2

In order for it to stop the execution, I pressed ctrl+c (otherwise it was stuck in the same state). After pressing ctlr+c, I saw the following:
image

I also tried the same steps all in the energat directory and it displayed the same.

Thank you and have a nice day! :)

from energat.

HongyuHe avatar HongyuHe commented on July 23, 2024

Hi @mesld,

Thanks for asking!

For the missing baseline power, I'm sorry but I failed to reproduce it on a clean-slate server in the cloud. Could you check the following please?

  1. Make sure that you've run the setup script indicated in the README (./scripts/setup/init_system.sh).
  2. Try placing your program in the same directory as the one where the base power is estimated. (Sorry about this. Will fix this inconvenience soon.)

For the keyboard interrupt, yes, the output is expected since you interrupt the running program. The point here is that energy traces will be saved even your program is crashed by the interrupt. Also, given your output, it seems that the energy tracing is working. Could you also check the output please?

Let me know if you still have issues with it.
Thanks!

from energat.

HongyuHe avatar HongyuHe commented on July 23, 2024

Hi @mesld! Yes, that's the correct output. Glad to see it works for you now!

pkg == CPU package, which is also used interchangeably with socket in the code. (They are referring to the whole CPU but are different things.)

from energat.

mesld avatar mesld commented on July 23, 2024

Hi @HongyuHe!

Great :) Thank you!

from energat.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.