I have virtual machine "CentOS Linux release 7.1.1503 (Core)" , where I can not find cgroups, "/sys/fs/cgroup" directory has nothing in it. I have also installed cgrouplib pakages but still there is nothing.
How I can get cgroups , would be very helpful you anyone can provide the details.
Thanks a lot!!
Centos has cgroups installed under /cgroup.
You can check the enabled cgroups under /proc/cgroups.
cat /proc/mounts | grep ^cgroup will give the location where cgroups are mounted.
Related
I have installed dpdk 18.08 on a Centos 7 machine, which has the kernel source installed.
I built dpdk using:
$ make -j T=x86_64-native-linuxapp-gcc install
<snip>
Build complete [x86_64-native-linuxapp-gcc]
Installation cannot run with T defined and DESTDIR undefined
I want to interface dpdk to a HP NIC that uses the Intel X722 chipset. So I then run:
$ /opt/dpdk/dpdk-18.08/usertools/dpdk-devbind.py -b igb_uio `lspci | grep X722 | awk '{print $1}'`
Error - no supported modules(DPDK driver) are loaded
I think that this error means that the DPDK kernel module is not installed.
How can I fix this?
Based on the comment interaction, the reason for missing Kernel Module. Installing igb_uio or vfio-pci has solved the problem.
I am moving from mysql to MariaDB. With mysql I was linking the C connector to my application with mysql_config --libs, and according to what I can read on internet it should still be possible with MariaDB, but on my system mysql_config does not exist and I do not know how to get it and if the copy I will eventually get will be still compatible with MariaDB.
So the question is: how to link MariaDB to my C/C++ application?
Debian 10 (Buster) 64 bits ~
mariadb-server Version: 1:10.3.15-1 ~
mariadb-client Version: 1:10.3.15-1 ~
Thank you in advance.
Well, this is what I do:
sudo apt-get install libmariadbclient-dev
And the link command will be -lmariadbclient
To avoid naming collisions with either MySQL or MariaDB Servers prior to 10.2 (MariaDB Connector/C is bundled with Server since 10.2) MariaDB Connector/C doesn't have the mysql_config script anymore, instead of please use mariadb_config.
On my system I had installed only mariadb-server and mariadb-client, so mariadb_config was not present and mysql_config is not used anymore.
I found out that I need to install also libmariadb-dev which pulls in mariadb_config and all the headers and libs necessary to compile and link my application.
Many thanks to Georg and Sharath who gave me the right hints to find the solution.
the problem is already known, that gdb doesn't work with OS X Sierra anymore.
This is really annoying, since I researched already about the solution, and there were some solutions, but they apparently don't work anymore. I tried to use the .gdbinit file solution and the disable csrutil solution, both doesn't work.
Sooo my question is: Does anyone know how to fix it in 10.12.3 ?
Thank you very much!
Looks like there still isn't a solution to this. I don't think "use LLDB instead of GDB" is the ultimate solution. So I went ahead and built a fairly basic docker container which contains the very basics (g++ and gdb).
Here is the Docker Hub container, and the the Dockerfile is on this Github repo.
This solution at least allows you to use GDB on your Mac via a couple simple commands. And since the folder you're coding on is mounted, as soon as you hit save, all your changes appear automatically.
Hope this helps someone else out there.
So thanks to Basile Starynkevitch, who just gave me the idea to update gdb
SOLUTION:
You simply have to update gdb for the latest version (which is 7.12.1 currently). Assuming you have installed Homebrew:
That's what I did:
brew update
brew remove gdb
brew install gdb
It has now updated to the latest version.
Now codesign gdb again with the cert that you used before.
sudo killall taskgated
codesign -fs gdb-certi /usr/local/bin/gdb
launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist
Last step is still to use the workaround to create the .gdbinit file:
nano ~/.gdbinit
-> set startup-with-shell off
Debugging works for me now :) (OS X Sierra 10.12.3 - gdb 7.12.1).
UPDATE:
Apparently it will fix certain problems, but not the whole problematic itself. It will still cause errors. Honestly, my solution: When you can: Switch to LLDB and another IDE (Netbeans does not support LLDB). Or use Linux. I currently use Ubuntu with a stick on my MacBook Pro.
None GDB 7.11 or 7.12.1 will not work on Sierra 10.12.4 In short it's because of Apple security upgrade. We need to wait for re-enabling when some new version will shows up.
Easy WA is to use LLDB as a debugger for now. Sample instructions here
Another LLDB instruction here
I found that gdb 7.12.1 did not work for me either. I do not think it includes the crucial commit 82b19a4d2f9c9e8d56f to gdb made on the 9th Nov 2016.
I was able to get the gdb 8.0 development branch to work, however.
Download with, e.g.
git clone --depth 1 --branch gdb-8.0-branch git://sourceware.org/git/binutils-gdb.git
Then go into the checked-out directory
cd binutils-gdb
I have macports so (a) wanted to link to macports libraries and (b) wanted to avoid putting stuff in /usr/local so configured with
./configure prefix=$HOME LDFLAGS="-L/opt/local/lib" CPPFLAGS="-I/opt/local/include"
make -j8
make install
=> puts gdb executable into ~/bin; (static) libraries into ~/lib; documentation into ~/share
Then follow André's tip above to do the code signing; though it will now be
codesign -fs gdb-certi ~/bin/gdb
I have a system that has a set of Self-encrypting drives (SEDs) with OS (Ubuntu on one and CentOS on the another and rest blank) installed on each of them. I'm trying to write an application that allows me to 'lock/unlock' the drives using TCG security commands. So when I'm in ubuntu, I lock all the other drives; and when I am in CentOS I lock the Ubuntu OS disk.
My problem right now is, from Ubuntu how do I figure out which disk (sda /sdb/ sdc ???) the current running kernel is sourced. It needs to be a generic logic so that the technique works for a ubuntu / ubuntu installation pair, hence just detecting the centOS partitions will not help.
Any help will be appreciated.
I am trying to write some openFrameworks (C++) code in a VM. My host is Windows 8 and I've tried both Arch Linux and Ubuntu guests. My host computer runs the graphics code just fine with an NVidia Optimus setup and 8GB of RAM.
I do my main development in Visual Studio, however I do prefer to create Android and test packages from Linux. For this reason I just want to fire up a VM and take care of business. The problem is that some of my graphics apps need OpenGL 3+
Has anybody else had the same problem and solved it?
Give up on VirtualBox. VB's OpenGL guest support craps out at 2.1, even then only after you install VB Guest Additions from the command line with switches and then add some Registry keys to actually enable the OpenGL guest drivers.
If you're willing to shell out money, VMware Fusion for Mac and VMware Workstation for Windows both support DirectX 10 and OpenGL 3.3.
A bit late to the party here, but hopefully helpful for someone encountering similar issues these days:
The mesa software renderer now supports OpenGL 4.5, so for me, the solution is to disable 3D acceleration in the settings of the VirtualBox machine!
The mesa software OpenGL support then takes over and provides its capabilities. It's for sure not that fast, but for my purpose (testing whether an OpenGL application starts and displays something under linux) it's sufficient!
Tested both on Fedora 34 and Ubuntu 20.04.
Try VirtualBox and prepend MESA_GL_VERSION_OVERRIDE=3.0 MESA_GLSL_VERSION_OVERRIDE=130 to your linux command line. Some of the opengl3 functions may work. Though not all of them will. I used that to bring up Civ5, the animation did not show up, nor did the on-screen fonts.
If you want to see the source code:
VirtualBox uses chromium 1.9 that is opengl 2.1. The info can be verified by the glxinfo command. Use the following commands to track the VirtualBox opengl lib file:
$ ldd /usr/bin/glxinfo
$ apt-file search /usr/lib/x86_64-linux-gnu/libGL.so.1.2
$ LIBGL_DEBUG=verbose glxinfo
Then follow links:
$ ls -l x86_64-linux-gnu/dri/
lrwxrwxrwx Apr 14 2014 vboxvideo_dri.so -> ../../VBoxOGL.so
$ apt-file search /usr/lib/VBoxOGL.so
virtualbox-dbg: /usr/lib/debug/usr/lib/VBoxOGL.so
virtualbox-guest-x11: /usr/lib/VBoxOGL.so
$ dpkg -l virtualbox*
ii virtualbox-guest-x11 4.1.18-dfsg-2+deb7 amd64
$ apt-file list virtualbox-guest-x11
...
The source code tarball was virtualbox-4.3.10-dfsg.orig.tar.gz from trusty repo. The version string can be grep'ed by $ grep -r CR_OPENGL_VERSION_STRING * and $ grep -r CR_VERSION_STRING * in the source code directory.
Update 6/1/2017: Someone told me the kvm works for civ5. A quick search turned up this thread titled "GPU Passthrough with KVM: Have Your Cake and Eat it Too". The thread is too long to read, though hope it could be useful to somebody.