I would like to monitoring the consumption of energy of my notebook.
I like of IPMI and installed.
After install, I loaded all modules and run the ipmitool command and show the follow error:
ipmitool -I open chassis power status
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Unable to get Chassis Power Status**
The output dmesg is:
ipmi message handler version 39.2
ipmi device interface
IPMI System Interface driver.
ipmi_si: probing via hardcoded address
ipmi_si: Adding hardcoded-specified kcs state machine<
ipmi_si: Trying hardcoded-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
ipmi_si: Interface detection failed
Anybody can help me?
Thank you!!
IPMItool can only check server power which equipped with one physical controller(BMC) which have kcs channel with i/o address 0xa2 to communicate between PCH and BMC. This is what dmesg indicated. Notebook should not be able to make it....
Related
I'm using an dual-port NIC, Mellanox ConnectX-5, and the DPDK version is dpdk-stable-19.11.3. After configuration, the call of rte_eth_dev_count_avail() returns 2. But only one port of my ConnectX-5 NIC is connected to the other machine. All I can find is to init all available ports like this.
RTE_ETH_FOREACH_DEV(portid)
if (port_init(portid, mbuf_pool) != 0)
rte_exit(EXIT_FAILURE, "Cannot init port %u\n", portid);
Can dpdk selectively init ports? Or is there any way to make rte_eth_dev_count_avail() returning 1?
Another quick way to assign a particular port out all available ports to DPDK application by using DPDK tool dpdk-devbind.py and EAL port initialization will pick port which is assigned to UIO/VFIO kernel driver. Below are devbind script steps to identify port current status and how to bind required port to DPDK.
[root#linux usertools]# ./dpdk-devbind.py --status
Network devices using kernel driver
===================================
0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
0000:00:04.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
[root#linux usertools]# ./dpdk-devbind.py --bind=vfio-pci 00:04.0
[root#linux usertools]# ./dpdk-devbind.py --status
Network devices using DPDK-compatible driver
============================================
0000:00:04.0 '82540EM Gigabit Ethernet Controller 100e' drv=vfio-pci unused=e1000
Network devices using kernel driver
===================================
0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if= drv=e1000 unused=vfio-pci
[EDIT-1] based on the updated question from author, the request is identify from the available DPDK ports which is connected? as mentioned above answer one needs to use rte_eth_link_get
Yes one can selectively init ports by passing the right PCIe Bus:Device:Function address as a whitelist. Hence only desired ports will pop up in the application.
How to do it:
create a dummy application to take in all DPDK port.
Initialize and start the dpdk ports. Check for link-state and create port-mask (global variable) which filters in application logic.
Invoke rte_eth_dev_stop & rte_eth_dev_close for link down ports.
Invoke rte_eal_cleanup.
Use the port-mask, as an argument for execv to invoke your desired DPDK application.
this way you can run your application with valid ports to it.
But relying on rte_eth_link_get is tricky because
if the other end is connected to dpdk-pktgen, first your DPDK application has to init the NIC locally.
if connected to linux box, the nic has to be bought up first with ifconfig [other nic] up
at times one needs to check link.link_speed if its valid.
certain PMD needs write to PCIe mapped register, hence has to dev_configure and port_init to get a reliable reading for link status.
Hence safest and recommended way to use is identify the NIC PCIe B:D:F in Linux driver and then whitelist the ports by using option -w for the desired port under igb_uio/virtio-pci. This can be done by bind all NIC back in linux by
lshw -c network -businfo will list NIC and PCIe Bus:Device:Function with kerel device name and driver.
use ethtool [eth device name] | grep Link to identify the link is connected.
for reference, you can use https://github.com/vipinpv85/DPDK-APP_SAMPLES/blob/master/auto-baseaddr-selector.c as template for dummy applciation.
Hello I am trying to create an i2c slave device on my beaglebone black(debian 10) which is running the kernel version 4.19.94-ti-r42.I was going to implement my own i2c slave device driver by writing my own kernel module but then i cam across a command that i think would allow me to instantiate a slave device on the i2c bus 2 without having to do any of that.I used the following command to do this:
echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-2/new_device
which i got from the following site: https://www.kernel.org/doc/html/latest/i2c/slave-interface.html
yet when i ran the command i got the following error:
-bash: /sys/bus/i2c/devices/i2c-2/new_slavedevice: Permission denied
Does anyone know what i may be doing wrong? Thank you.
Are u trying to instantiate a i2c-slave(i.e access the eeprom device), or custom "linux-i2c-slave" to handle the read/write for that address.
I presume that you are using beaglebox, and want to instantiate eeprom device on it from linux.
In that case, you need an i2c-slave, and the command would be
echo 24c02 0x1064 > /sys/bus/i2c/devices/i2c-2/new_device
Hope I have understood the question correctly.
For Matlab integration before we have a real connection to a physical controller. I want to start working with a fake Modbus device.
Below the script that I am using to start a fake Modbus device, after activating volttron:
python scripts/scalability-testing/virtual-drivers/modbus.py ~/git/volttron/examples/configurations/drivers/catalyst371.csv 127.0.0.2 --no-daemon --port 5020 --debug-output
Please, how to make the integration with a fake device successfully.
Thanks,
Error message
The message you are seeing is normal output for the fake modbus device. It's successfully setup all of the registers in the csv file as registers on the device.
The next step is to setup a modbus device driver in VOLTTRON and point it at the local host port 5020.
You can find the documentation for the Master Driver Agent (the platform interface Agent for devices) here: http://volttron.readthedocs.io/en/master/core_services/drivers/Driver-Configuration.html
Installing Agents is done with the script scripts/install-agent.py (see the help message for instructions).
My Raspberry Pi 3 can connect briefly to my Android mobile, but once I accept the connection on the Raspberry Pi, I get this error:
GDBus.Error:org.bluez.Error.Failed: No such file or directory. Try to connect manually.
Please help me on this.
You can fix that from Bluetooth control. Type $bluetoothctl as root then you will end up with Bluetooth shall. There you should type "power on" command. After that you can use "scan on" command to check connection.
to continue from Dinusha's answer, after you scan and find your device's ID (you should also be able to see it's name in parentheses) you'll need to pair with the device by doing
pair <device ID>
then connect with the device by doing
connect <device ID>
You'll be able to see status of the connection
There are cases where I use a separate bluetooth dongle for connections I don't want dropped
Raspbian Jessie has some issues as far as I know with the Bluetooth module. I'd recommend using bullseye or buster. Also, there are a couple issues regarding the newest kernel. Run the following command to see if your phone which you are willing to connect is listed:
sudo bluetoothctl devices
If your mobile device is still listed here and not paired on the mobile side, there is your problem. Remove the device using the following command in RPI:
sudo bluetoothctl remove <mac-adress-of-device>
I'm trying to learn how to write C code that will read from the serial port in Linux. I've found what seems to be a good tutorial here.
I want to be able to test this code, so I think I need either a serial port, or a way to write to the serial port while the code from above is reading.
I'm running Ubuntu 10.04 as a virtual machine on my Mac using virtualbox. My idea was to set up a virtual serial connection and write from the host to the guest. Hopefully something as simple as cat "Hello World" > /tmp/fake_serial in a host terminal, and for that to be read by the program in the link above.
Is this possible? I've tried adding a serial port using virtual box and when I try to do the above command I get an error saying I can't write to a socket.
The second option I thought of was using something like minicom inside the guest OS, to connect to say /dev/ttyS1 and write messages for my code to read at the same time. Again, assuming that the baud rates and other settings are OK, would this be possible?
I don't have a lot of experience working with serial ports, so I'd appreciate any suggestions about the best way to do this. Thanks in advance.
So to get this working I just added another Ubuntu VM on VirtualBox, and connected the two together via a virtual serial port. My main, original VM, which I use for a lot of developing will be referred to as VM1. The new VM, with a small hardrive that will only be used for sending messages to VM1 will be called VM2. These are both Ubuntu 10.04 VMs.
In VirtualBox go to Settings for VM1, go to ports, and change the settings as follows:
Now go to VM2, and select settings, ports, then change as follows:
Now first you need to start VM1. When that's booted then boot VM2. Now you can open a terminal in VM1, and type screen /dev/ttyS0 38400 (you may need to run sudo apt-get install screen before this works). Then go to VM2, open a terminal, and type echo "Hello" > /dev/ttyS0.
You should see Hello appear in the terminal open in VM1. When you're done running screen press ctrl-a k to kill it, otherwise if you try to do other stuff with the serial port you may get an error message saying that the port is busy.
When I had to do some serial port testing from my real to virtual machine I ended up doing a "loop back" type testing. I took two USB-Serial converters and a RS232 F-F adaptor and connected my machine to itself. Then in VirtualBox under Settings->USB you can route one of the two USB-Serial converters to be "owned" by your VirtualBox.
Once you plug in the converters one will register with the Mac and one with the Ubuntu "computer" then you can do serial communication as normal between the two machines.
You may also be able to emulate a virtual serial port using a pty ("pseudo-teletype" device), but I'm not positive on that one since I believe the ability to do that was locked down in newer kernels.
I ran into a similar situation running a QNX guest using VirtualBox 5.0.10 on an Ubuntu 14.04 host.
My solution seems general enough to apply to the above-mentioned case.
I configured the guest VM in the same way that Kells1986 setup his VM1:
Under the "Serial Ports"/"Port1" tab:
check "Enable Serial Port"
set "Port Number" to "COM1"
set "IRQ" to "4"
set "I/O Port" to "0x3F8"
set "Port Mode" to "Host Pipe"
uncheck "Connect to existing pipe/socket"
set "Path/Address" to an accessible file-system path (e.g. "/home/safayet/vmSerialPipe")
According to the VirtualBox manual:
You can tell VirtualBox to connect the virtual serial port to a
software pipe on the host. ... On a Mac, Linux or Solaris host, a local domain socket is used ... On Linux there are various tools which can connect to a local domain socket or create one in server mode. The most flexible tool is socat and is available as part of many distributions.
A domain socket is an IPC mechanism on UNIX systems similar to a pipe.
I connected to the "pipe" end of the virtual serial port on the Ubuntu host using the socat command:
socat - UNIX-CONNECT:/home/safayet/vmSerialPipe