I have been a set few questions, one of them is: Which of these ARM instructions clears register r5, so that all of it’s bits are set to ’0’? From my understanding sub r5, r5, r5 clears the register as it subtracts the number from itself. The and and eor ones clearly look wrong. Does the lsr r5, #32 als…
Tag: linux
How to hide “idle” (both CPU and RAM) processes in top?
I have a linux command based on top that outputs my current tasks snapshot (I’ve assembled it from various SE topics so it may not be optimal but it works for me): The output is something like this: [2018-11-20 18:09:11] {CPU:0.0,MEM:0.2,CMD:uwsgi} [2018-11-20 18:09:11] {CPU:0.0,MEM:0.0,CMD:uwsgi} [2018…
rabbitmq cluster mistmatch hostname issue
I have deployed openstack-ansible with 3 node rabbitmq cluster and it use lxc to run rabbitmq on top, I am seeing very strange error here when i did rabbitmqctl status command, if you notice its talking to wrong node ostack-controller-01 is host node and not a actual rabbitmq node.. How do i fix this behavior…
C: Why passing a float/double literal for an int argument does not raise warnings?
Consider this code: I compile it with gcc -Wall sleep.c -o sleep with no warnings. Running it gives me time ./sleep real 0m0,001s user 0m0,001s sys 0m0,000s .1 magically becomes 0, but my question is why no warnings? I’m using stock gcc 7.3.0 in Lubuntu 18.04 Answer It’s a valid conversion –…
Cannot get memory allocated from `flex_array_alloc` when requesting a relatively big size in linux kernel
I’m doing some linux kernel development. And I’m going to allocate some memory space with something like: ptr = flex_array_alloc(size=136B, num=1<<16, GFP_KERNEL) And ptr turns out to be NULL every time I try. What’s more, when I change the size to 20B or num to 256,there’s nothi…
Program can compile on Mac, but not Linux. Gets error: converting to from initializer list
I have a program which will successfully compile on my mac but when I try on my linux desktop it cannot. Instead, I get the following error: like 12 of plot.cpp looks like this: This vector is initialised in header.h, here: I have looked around a bit and I suspect the error is coming from the line in header.h…
Unsigned long into char array
Here is an example of my code : My question is, why does this last memcpy works ? i would expect to put CRYPTO and not &CRYPTO in arguments… For me, CRYPTO is the value i want so 0xe8ba8fa3 and &CRYPTO the address. And for me, CRYPTO is not a pointer, so why i need to use memcpy with &CRYPTO
Not able to create SSIS DB Catlog in linux RHEL 7
I am not able to create SSIS DB Catalog on my MS SQL Server which is installed on Linux RHEL 7 Server. Though I have installed SSIS on Linux RHEL 7. Whenever I am trying to create SSIS DB Catalog i am getting this error. TITLE: Microsoft SQL Server Management Studio The path to the catalog backup file could n…
Why are some Bash commands both built-in and external?
Some commands are internal built-in Bash commands while others are external (other programs). I see why certain commands need to be built-in. Some of the reasons are: If a command needs to change the internal state of the shell process. If a command performs a very basic operation in the shell. If a command i…
Unaligned writes on block devices
I’ve read that write of block of unaligned size can induce extra reads.I mean writes on block devices in Linux. Why? How can I see it? Answer Block devices can only be written or read at their native block alignment, which for everything I’ve ever encountered is either 512 bytes or 4096 bytes. You…