Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help when using virtualwatts in ubuntuVM #1

Open
fridofredi opened this issue May 5, 2022 · 0 comments
Open

Need help when using virtualwatts in ubuntuVM #1

fridofredi opened this issue May 5, 2022 · 0 comments

Comments

@fridofredi
Copy link

fridofredi commented May 5, 2022

Hello,
I'm trying to set up virtualwatts on an ubuntu VM and I'm encountering some issues.
I manage to fix some bugs in the python file as below

- for process, _ in pid_cpu_usage
+ for process in pid_cpu_usage

on line 90 in procfs_sensor main

- global_cpu_usage += float(pid_cpu_usage[process].replace(", ", "."))
+ global_cpu_usage += float(pid_cpu_usage[process].replace(",", "."))

on line 91 in procfs_sensor main
Running the command with

+ python3 -m procfs_sensor procfs_config_file.json
- python3 -m procfs_sensor --config-file procfs_config_file.json

My virtualwatts config_file

{
    "verbose": true,
    "stream": true,
    "input": {
        "puller": {
            "type": "filedb",
	    "filename": "/media/virtualwatts/SW_output",
	    "model": "PowerReport"
        },
	"puller_tcpdb": {
		"type": "socket",
		"uri": "127.0.0.1",
		"model": "ProcfsReport",
		"port": 8081
	}
    },
    "output": {
        "power_pusher": {
	    "type": "influxdb",
	    "model": "PowerReport",
	    "uri": "127.0.0.1",
	    "port": 8086,
	    "db": "power_consumption",
	    "collection": "prep"
        }
    },
    "delay-threshold": 500.0,
    "sensor-reports-sampling-interval": 1000
}

My procfs sensor config file

{
    "name": "procfs_sensor",
    "verbose": true,
    "frequency": 1000,
    "output": {
        "type": "socket",
        "uri": "127.0.0.1",
	"port": 8081
    },
    "target": ["."],
    "sampling-interval": 1000
}

Then I'm running all these like that :

sudo python3.10 -m virtualwatts --config-file config_file.json
sudo python3.10 -m procfs_sensor procfs_config_file.json

Doing all that I don't have the data push to the influxdb. I'm getting this in the terminal

DEBUG::1651746444.3434865::puller_tcpdb::send report ProcfsReport(2022-05-05 12:27:24.220602, procfs_sensor, ['.'])to ActorAddr-Q.ThespianQ.c
DEBUG::1651746444.345075::cpu_dispatcher::received ProcfsReport(2022-05-05 12:27:24.220602, procfs_sensor, ['.'])
DEBUG::1651746444.345324::cpu_dispatcher::send ProcfsReport(2022-05-05 12:27:24.220602, procfs_sensor, ['.']) to formula0__procfs_sensor
DEBUG::1651746444.3461027::formula0__procfs_sensor::receive Procfs Report :ProcfsReport(2022-05-05 12:27:24.220602, procfs_sensor, ['.'])
DEBUG::1651746444.3467846::formula0__procfs_sensor::No synced pair yet

Note that I'm using the python version of virtualwatts and procfs_sensor.

Can you please help me fix that ?
Thank you in advance.

@fridofredi fridofredi changed the title Need help while using virtualwatts in ubuntuVM Need help when using virtualwatts in ubuntuVM May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant