When virtual memory systems decide to evict a memory page out to disk, it’s sometimes mentioned that the last time of access of that memory page is used to help decide which page is evicted. But what mechanism is used to track the last time of access of a memory page? I believe the TLB only stores infor…
Tag: linux
UIO and msync: Why does msync return “invalid argument” even though the address is a multiple of PAGESIZE
Linux version: 4.19 Platform: Xilinx Ultrascale+ Zynq In the programmable logic I’ve created a memory mapped device located at physical address 0xA0001000. I’m using uio_pdrv_genirq as my device driver. The device shows up as uio0 and I’m ready to read and write to it, using mmap. I want to …
Diolan DLN-2 SPI controller on x86_64 platform
I am attempting to utilize the DLN-2 in an x86_64 Linux environment (kernel version 4.18) to provide SPI and I2C bus controllers to the userspace, in a similar manner you would using an ARM platform with DTS/DTB file modifications. I am having trouble identifying the proper method to attach a SPI slave device…
Amazon EC2 Linux – Azure devops Agent installation throws an error while run config file
./config.sh: line 85: ./bin/Agent.Listener: cannot execute binary file Answer Update: The build agent does not support x64 based ARM (aarch64, arm64). More details please take a look at this similar issue: ARM agent fails to configure The agent is based on .NET Core 2.1. You can run this agent on several Linu…
How to run remote script on multiple host simultaneously
I have a great amount of Linux servers to maintain. Frequently I need to run a script (script.sh) on all of them to get the health status, this script usually takes about 30-40 seconds to give an output. To facilitate maintenance tasks, I’m writing a shell script that uses SSH to loop through all remote…
Docker overlay2 resource is busy
I need some help with docker! 😀 When I have to deploy my application, sometimes I have this error OR This is my docker info output: Everytime that the resource is busy error appears, I move the HASH’s directory in /var/lib/docker/(containers OR overlay2) to HASH_old directory and retry to deploy the app…
Loop Never Ends in Assembly?
Basically, I have below assembly code: I am trying to loop through 0-50 and print the variable pas or probably buf from input box. But this loop keeps printing pas endlessly. I Presume the issue is the re-assignment of ecx, but otherwise without putting my string into ecx how would I print it? or even execute…
How to jq to copy array inside the dictionary?
I have the following json I want to convert it to How do I do this with jq? Answer The solution is the following: In the Command line: See:https://jqplay.org/s/MJ-GoLOBX2 There is more documentation available at: https://programminghistorian.org/en/lessons/json-and-jq#the-dot- Also see the hints below jqplay …
GREP to search for second column in a text file
I need to GREP second column (path name) from the text file. I have a text file which has a md5checksum filepath size . Such as: the above is the text file, I used grep -Eo ‘[/]’ file.txt but it prints only / , but i want the output like this: Lastly I have to use GREP. Answer If you
unix command to search count of 5XX status HTTP requests in the log
i need to write a unix command to search count of 5XX status HTTP requests in the log. Log format is like below example : any suggestions ? Answer A minimal solution would be grep will filter the output to only the lines including the string 5XX, where X is any digit character. This output is then piped to wc