Questions tagged [linux]

80903 questions
1

votes
0

answer
33

Views

How to set preference for one of duplicating sections in man pages?

I see the following question every time I open man pages for git commands: -> man git-log Man: find all matching manual pages * git-log (1) git-log (1+) Man: What manual page do you want? After that I have to wait till the first section is opened automatically or choose it manually. The question is...
Maxim V.
1

votes
0

answer
83

Views

ioctl sniffer in Linux

Is there any utility which allows to sniff ioctl commands and data being sent between application and kernel. I need to track a bug which requires the sequence of ioctl commands send between a working application and non-working application. Google Search found me a utility for Windows. https://gith...
md.jamal
1

votes
0

answer
61

Views

What's the right way to get the current time in python in a way that will be guaranteed to be consistent with the filesystem?

I have a very simple build script that's behaving in an unexpected way (for me) on Linux. Part of the script simply checks that the files generated by a build stage hasn't been manually replaced with a stale file. # load the cache from a json file if os.path.getmtime(some_path) < cache['timestamp']:...
Frank
1

votes
0

answer
547

Views

Using POSIX semaphores between processes (Named semaphores, Linux, C)

The main idea of this simple program is to make communication between processes through the shared memory and limit their access by using semaphores. 'Forks' creating the main Parent Process and 3 Child Processes. Child are consumers and Parent is the producer. Child ought to get in the queue for ev...
LowProfile
1

votes
0

answer
1.7k

Views

perf have no permission to collect stats

When I use perf to collect system stats, like this sudo perf record -a -g -F 997 -p pid sleep 30 then I got Error: You may not have permission to collect stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid: -1 - Not paranoid at all 0 - Disallow raw tracepoint access for unpriv 1 - Disallow...
bloomstar
1

votes
0

answer
271

Views

resizing file size with ftruncate() after mmap()

The code snippet works fine on my machine(Linux/x86-64) int main() { char* addr; int rc; int fd; const size_t PAGE_SIZE = 4096; // assuming the page size is 4096 char buf[PAGE_SIZE]; memset(buf, 'x', sizeof(buf)); // error checking is ignored, for demonstration purpose fd = open('abc', O_RDWR | O_CR...
tristan
1

votes
1

answer
49

Views

Why aren't my windows being displayed? (Ncurses)

I'm trying to create this program where I print two windows side by side on the stdscr. I've created the class 'menu' to declare everything about the whole screen in one place, I create a 'menu' object ('menu_principal') in main but nothing happens. I added two functions to see if my object is being...
Rodrigo Ordóñez
1

votes
0

answer
45

Views

Loop exiting early when making Linux system calls [duplicate]

This question already has an answer here: Why do x86-64 Linux system calls modify RCX, and what does the value mean? 1 answer What are the calling conventions for UNIX & Linux system calls on i386 and x86-64 4 answers I am trying to write a program that prints an integer, the integer is stored in...
うちわ 密か
1

votes
0

answer
45

Views

Intel graphics driver

I’m interested in Linux graphics stack, especially how a linux graphics driver works. I learnt that Intel offers open source graphics drivers for linux for their chips and I have an old laptop running intel p6200 which has a built-in graphics card, so I think it’s a good idea to take the laptop...
skipper
1

votes
0

answer
69

Views

After changes in pam crontab stop working

I have made changes in : cat /etc/pam.d/common-session-noninteractive sudo vi /etc/pam.d/cron sudo vi /etc/security/limits.conf after rebooting system crontab stop working when I check syslog it shows below error: PAM (cron) illegal module type: ession cron[4936]: Permission denied
Sandesh Dumbre
1

votes
1

answer
48

Views

shared mem betwwen kernel/user space and select

I have some specific hardware which run on FreeBSD and Linux. I have to do an user space application which will work with the driver using shared memory between kernel/user space application. My application does busy poll on the shared mem from user space. Is there any idea how I can use a mechanism...
rezo n1
1

votes
0

answer
151

Views

How to avoid generation of extra assembly instruction by gcc compiler for an inline assembly function

I have two questions about generation of assembly code by gcc as a result of using inline assembly function in C file. Let me first explains my situation/code and then I will ask questions. Situation: I have defined following macro NBL2SPM which calls the mySimMagic2() function. #define NBL2SPM(comp...
NUM
1

votes
0

answer
286

Views

Ansible win_shell hangs in git pull

I am using win_shell module to remotely execute a 'git pull' command, But it hangs and no returning values to the terminal. My play book - name: connect to web server 1 hosts: windows gather_facts: false tasks: # - name: execute git pull - win_shell: git pull args: executable: cmd chdir : c:\inetpu...
arshadzackeriya
1

votes
1

answer
182

Views

Jenkins Pipeline plugin Linux error while running shell script

I am trying to run a shell script using Jenkins pipeline plugin on a agent machine. Below is the pipeline sample script: node('XXXXX'){ currentBuild.displayName = '' sh 'XXXXX' } While running I am getting the error: Could not open 'getent hosts ent410373 2>&1|' : No such file or directory ent410373...
Goutham Nithyananda
1

votes
1

answer
264

Views

Laravel folder permission for not-yet made cache folders

I'm having an issue with directory permissions with Laravel when it comes to caching. Whenever it tries to upload a cache file to /var/www/laravel/storage/framework/cache/data/ it tells me that file_put_contents has no permissions. To fix this I always do something like chmod -R 755 /var/www/laravel...
P. Nick
1

votes
1

answer
101

Views

How mod_jk handling node failure

We have configured mod_jk with two tomcat servers with 2 apache web servers. We wanted to know how mod_jk handling node failure or how it will do a health check.?
Pramod Gouda
1

votes
0

answer
55

Views

JSF error in Tomcat8 but working in Tomcat7

I have a JSF webapp perfectly working in Linux Tomcat7 and Windows (Tomcat7 and Tomcat8.0.24). But in Linux Tomcat8.0.32 it fails with errors : javax.faces.FacesException: /app/login/IndexLogin.jsp (line: 8, column: 0) Absolute Uri: http://java.sun.com/jsf/core can not resolve org.apache.myfaces.co...
Zirikatzaile
1

votes
2

answer
508

Views

How to build the Linux kernel for powerpc and boot it on qemu?

I had compile a linux kernel and generating root file system using buildroot for 64-bit powerpc. Target CPU POWER7. Output of buildroot: 1] rootfs.cpio 2] rootfs.ext2 3] rootfs.tar.gz 4] vmlinux Start qemu simulation with qemu-system-ppc64 -m 1024 -kernel output/images/vmlinux -initrd output/images/...
Shail Thacker
1

votes
1

answer
372

Views

Load linux kernel module at boot

I have written a kernel module for a study research project that is a driver for seven segment displays connected to a Raspberry Pi (I am pretty new to kernel development). I would like to permanently install the module and load it at boot time when it is compiled, so I added the install target to m...
Sandtler
1

votes
1

answer
144

Views

How to compile SQLite3 for Linux without warnings?

I am getting hundreds of these warnings when I compile my sqlite3.c file for linux. UATHelper: Packaging (Linux): C:\Users\pbssu\Desktop\Plugins\SQLite3UE4Plugin\Source\SQLite3UE4Plugin\Private\sqlite3.c(17134,5): warning: 'SQLITE_OMIT_AUTHORIZATION' is not defined, evaluates to 0 [-Wundef] UATHe...
Ryan Glen
0

votes
1

answer
31

Views

How to know which shared library my program is actually using at run time?

How do I figure out the path of a shared library that my program is using at run time? I have glibc 2.12 as the primary glibc running on my CentOS 6.10 system, and have also installed glibc 2.14 in /opt/glibc-2.14. When I inspect my executable file with $ objdump -p ./myProgram it gives this info D...
Accountant م
1

votes
0

answer
9

Views

Is Mac System Integrity Protection defined within the sys/stat.h

I've done some hunting around on the internet and have not found a good way of programmatically determining if a given file has integrity detection turned on. I noticed that, unlike most linux headers I have run across, Darwin doesn't define their st_mode bits in the stat struct defined in /sys/st...
mreff555
0

votes
0

answer
14

Views

How to Debug 'ip link add vrf-blue type vrf table 10' RTNETLINK answers: Operation not supported

I am trying to enable vrf in Linux kernel 4.9.135 version and have enabled IP_MULTIPLE_TABLES, NET_L3_MASTER_DEV and NET_VRF in kernel and build the kernel. bash-4.3# zgrep 'CONFIG_NET_VRF' /proc/config.gz CONFIG_NET_VRF=m bash-4.3# zgrep 'IP_MULTIPLE_TABLES' /proc/config.gz CONFIG_IP_MULTIPLE_TABL...
Uma Shankar
1

votes
1

answer
123

Views

Raspbian building ncurses and vim from source

I don't have an internet connection and won't for at least a few weeks. I had to download a minimal version of Raspbian which vim isn't included by default. Without internet access on my Pi I'm not able to use the package manager. I downloaded ncurses 6.0 from https://ftp.gnu.org/pub/gnu/ncurses/nc...
Bryan Abrams
1

votes
0

answer
18

Views

Wizard accessing previously deleted SDK folder

I'm trying to set up my Android Studio environment on my Ubuntu through the Wizard but it doesn't go further than trying to download the 'android_m2repository_r47.zip' folder. I had a previous session with Android Studio but deleted it meanwhile (and the SDK folder as well). Now I'm trying to instal...
tmvaz
1

votes
0

answer
170

Views

How to allow pdf files in .htaccess?

I have this following codes in my htaccess file, but it doesn't allow pdf file to open, it will redirect to 404 page. how can I allow pdf files to open based on my following htaccess file. RewriteEngine on RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|updates|asset|mob|robots\.tx...
Jona
1

votes
0

answer
24

Views

how I could print in horizontal mode in chromium with command line in linux?

Im trying this command chromium-browser --headless --disable-gpu --print-to-pdf=file14.pdf file:///input.html this command print verticallly But i dont know how I could print in horizontal in command lines Please hep me
user8862613
1

votes
0

answer
22

Views

Debug remote devices with Chromium

I try to debug my app generated with ionic, but when open the chromium debugger, I have the follow problem... Debugger have a bug ?? My configuration Browser version: Version 63.0.3239.108 (Developer Build) (64-bit) My os: Linux Arch Please let me know if to anyone have the same problem and how to...
CATCODER PHP
1

votes
0

answer
223

Views

xdotool type takes ages and causes entire desktop to freeze

I've been using xdotool type in the past only to type a shrugface on shortcut using xdotool type '¯\_(ツ)_/¯'. That works, but always takes quite a long time and causes the entire desktop to freeze (entirely, not just input) for a few seconds. Didn't bother me much though. Now I need a way to rea...
confetti
1

votes
1

answer
45

Views

Unable to do a correct match

Hey guys I am working on a project in which, I need to store device names in the file and then I am trying to find that name using cat file | grep device and if that name exists i am trying to print the yes else no.I did this via the following code but I am unable to achieve the expected result, pl...
Dixon
1

votes
0

answer
35

Views

why does linux 0.11 use read lock when doing block reading?

I have read linux source code about block device part of version 0.11 and i found if two processes do reading block operation, one will lock the buffer(bh),another one has to wait this lock, my question is why reading will block each other by using such kind of locker? isn't it supposed to be write...
terry
1

votes
0

answer
147

Views

How to avoid zombie process from crond ( crond -l 9 )

My system based on Linux ( 3.12.14 ), I could see Zombie process [ sh ] creates for very frequently. I have found that (crond -l 9) which was parent process of zombie. I confirmed that, always crond -l 9 was parent process. As per crontab (crontab -l), lot of scripts are running based on configura...
mselvara1982
1

votes
1

answer
113

Views

why can't kernel access user process address directly

This article https://lwn.net/Articles/75174/ says that if the kernel wants to access a physical page, it needs to map it to a linear address in the kernel space (to high memory region). Suppose the page is already mapped by an user process, can the kernel just use the user-process page table to acc...
user1734905
1

votes
1

answer
85

Views

replacing all files with sed -i Argument list too long [closed]

I want to replace all files with sed -i. I want to replace word oldstring with newstring root-: sed -i 's| oldstring | newstring |g' * Argument list too long I have many files in the same dir. I want to replace all files strings. How can I solve this problem?
Sultan Alotaibi
1

votes
0

answer
742

Views

Unbinding and rebinding a Linux device driver

I'm currently fighting with a buggy hardware device under Linux. The device provides a series of interface endpoints. From what I can tell if I can configure the alternateSetting of a couple of these endpoints to their other modes then the device should behave properly. This functionality appears to...
Luke
1

votes
1

answer
259

Views

Can non-blocking system calls be interrupted?

I am reading The Linux Programming Interface which describes (in section 21.5) how a blocking system call can be interrupted by a signal. This seems to imply that a non-blocking system call cannot be interrupted. Is this true?
dippynark
1

votes
2

answer
66

Views

awk commands in file gives error when executed in loop

file_data.txt 73|8|42.320000|1559260800000|1|9667|0.00|42.320000||1485613678440| 153|8|35.680000|1559260800000|1|10899|0.00|35.680000||1482480306523| 2503|8|93.390000|1559260800000|1|6106|0.00|93.390000||1484304241803| 2672|8|49.990000|1559260800000|1|7754|0.00|49.990000||1482064270543| AWK_COMMANDS...
Ashish
1

votes
0

answer
98

Views

Can't pass out 3.5k req/s on AWS Varnish

I'm currently trying to deploy a Varnish on AWS. This varnish is intended to cache 1 file from S3 (only one file, less than 10kb), with a hit rate of 10k+ requests/s I've deployed my server on a m4.large instance (2vCPU / 8Gb Ram). I've launch a performance test from a Jmeter cluster but i can't pas...
Teddy Ferdinand
1

votes
1

answer
69

Views

Python/Pyglet on linux, script exits immediately

I am trying to start programming with pyglet on my lubuntu laptop. The script exits immediately. It shows a black window that disappears within 1 second. I don't see any errors. Am I doing anything wrong or is there any additional software that needs to be installed. I tried 3 scripts that I scaven...
hennep
1

votes
0

answer
67

Views

Invoke execvp from linux driver

Currently, i want to call execvp from kernel side. My program is programmed to go to halt mode. So i have tried to setup below code: char *argv[] = { '/sbin/halt', '-f', NULL }; char * envp[] = { 'SHELL=/bin/sh', 'HOME=/', 'PATH=.:/sbin:/usr/sbin:/bin:/usr/bin', 'PWD=/', NULL }; rc = call_...
Tiktac

View additional questions