I’m learning about wildcards and I’m trying to figure out how to find filenames that contain a specific character, two or more times. For example, finding filenames that have two or more x’s in them, such as Xerox. I know how to find files that have an *x, or that have an *ox*, but I canR…
Tag: linux
How to remove a broken installation of glibc
I just attempted to install glibc version 2.19 to my computer as follows: 1) I cloned the glibc git repo with 2) I checked out version 2.19 with 3) I made a directory objdir in my home directory, and built the installation there with 4) I tested the make with This gave me an error, but some webpage I found
Logstash File Input Latency on Linux
Logstash is running. How long takes it from adding a single line to a log file until Logstash recognize the new line and start to transform and output it. With a simple BASH script I measure from 99 msec up to 800 msec including a transformation. It’s clear that the latency depends on the Logstash trans…
Packer Amazon EBS Chef – sorry, you must have a tty to run sudo
I want to use Packer for provisioning image for amazon ebs using chef. I am getting the following error message: example.json Output I think the relevant error message is: Does anybody have an idea? Answer You can use ssh_pty : true to have a TTY.
perf enable demangling of callgraph
How do I enable C++ demangling for the perf callgraph? It seems to demangle symbols when I go into annotate mode, but not in the main callgraph. Sample code (using Google Benchmark): build command: perf commands: I’ve also tried enabling the –demangle option, but that doesn’t seem to affect …
DataStax opscenterd won’t start on Ubuntu 15.04 x64
Issue: sudo service opscenterd start Failed to start opscenterd.service: Unit opscenterd.service failed to load: No such file or directory. (ERROR)-(Exit Code 6)-(Unknown error code) sudo service opscenterd status opscenterd.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)…
Mem alloced via mmap without munmap will cause leak after process exits or terminals
there is the code about alloc mem via mmap void *ret = mmap(NULL, 4 * 1024, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); when process exits normally, the memory will be return to os ? Answer According to the man and under unmap: The region is also automatically unmapped when the process is terminat…
Tftp commands implementation to fetch remote data in a local ring buffer
I was looking for an implementation using tftp command sets which can fetch data from a remote server but instead getting data completely as a whole, it fetches the data in a local ring buffer of size lesser than the remote file size and it overwrites the data after the ring has been circled. So, if any proce…
Can’t run PHP exec() on command line
Hoping someone can help me out here. Trying to run any command using exec() returns 126 and displays the same error message. I’ve narrowed it down to this pretty minimal test case. SELinux and PHP safe mode are not enabled permissions are fine on /, /bin/, and /bin/ls asterisk is a system user created w…
Covariance matrix with opencl and opencv
I recently start to learn opencl and how to create kernel for OpenCV as well. I am still working with the basics. I need to implement an opencl kernel for calculate the covariance matrix. This function don’t have any opencl kernel already implemented by opencv’s fundation. Technically what I want …