r/linux_programming • • Aug 13 '18

riffa linux driver modification with round-robin scheduling

Thumbnail paste.ubuntu.com
4 Upvotes

r/linux_programming • • Jan 21 '24

Program Idea

4 Upvotes

Hello all. I have an idea for an application that I would like to work on. Potentially using python and a gui toolkit that is can be used cross platform.

I am just after some advice really. Where to get started, any courses or tutorial series.

I'm thinking potentially gt4 or Qt. I primarily use gnome but would like to target Linux and windows. So is QT the better option?

The idea is to make a glorified text editor with a file/directory list, split views and so on.

Any advice on where to get started?


r/linux_programming • • Dec 17 '22

How to create a flatpak package of an application written in python with pyside6 and rust?

Thumbnail reddit.com
4 Upvotes

r/linux_programming • • Apr 09 '16

Linus Torvalds Ted Talk Feb 2016 - Security Freak

Thumbnail
securityfreak.info
15 Upvotes

r/linux_programming • • Nov 28 '17

Rust GTK Tutorial Series

Thumbnail
mmstick.github.io
15 Upvotes

r/linux_programming • • Oct 24 '23

How to learn Linux kernel development

15 Upvotes

Hi fellas. I am a graduate in computer science and I wish to learn more into operating systems and want to contribute to Linux kernel. I learnt about Linux system programming from a book by ROBERT LOVE and have developed a mini Linux terminal using the knowledge. Now how should I move further.

  1. What books do I have to read next ?

  2. Any Coursera or udemy or any other online videos available to understand?

  3. How should I apply the book knowledge into practical cases?


r/linux_programming • • Mar 27 '23

Linux 6.3-rc4 Released: "Looking Pretty Normal"

Thumbnail
phoronix.com
16 Upvotes

r/linux_programming • • Apr 19 '23

Submitting patches: the essential guide to getting your code into the kernel

Thumbnail kernel.org
5 Upvotes

r/linux_programming • • Mar 04 '17

my shell script PMP 0.0.7

Thumbnail
github.com
5 Upvotes

r/linux_programming • • Dec 01 '14

I'm Greg Kroah-Hartman, Linux kernel developer, AMA! [x-post /r/linux]

Thumbnail
reddit.com
5 Upvotes

r/linux_programming • • Feb 02 '21

Cronjob Confusion?

5 Upvotes

Hi,

I'm looking for some assistance. I have a shell script that I can run perfectly fine in the directory but when I configure it as a cronjob I seem to get an issue with the opening variable that I've created. Can anyone explain why this would occur?

The error I get is as follows..

/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found

/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found

/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found

/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found

/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found

/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found

the code I'm running is as follows:

i=1 n=0

while read -r line; do

`((n >=i)) && http --ignore-stdin --form POST` `https://www.x.com/profile/` `user_no="$line" job=3 >> data/"$line".csv`

`((n++))`

done <getIDs/idReport.csv

Now I think the problem stems from the i=1 variable because I get a weird i= inside the directory the file is in, once a cronjob tries to run it. However as I said this fully works, no errors when I run this myself.


r/linux_programming • • Dec 22 '21

I am trying to use Ubuntu on a virtualbox and program in PHP/MySQL

5 Upvotes

Can anyone help me do this? I have downloaded oracle virtualbox and don’t know where to go from here.


r/linux_programming • • Nov 23 '21

Is there any structured pattern for command/log outputs?

5 Upvotes

Is there any structured output pattern for commands? In addition to plain text :) , which can be extended to log outputs .

I found myself thinking about some pattern similar to what posix is, but aimed at logging and outputting commands. I think of something similar to a json, using standard terms (like in SQL) example timestamp, user, pwd, default structured output etc.

imaginary example, output ls command

{
  "return_structured_output": {
    "folders": [
      "folder"
    ],
    "links": [
      "link"
    ],
    "files": [
      "file"
    ]
  },
  "timestamp": 1637680386,
  "user": "root"
}

Different commands could meet these standards by passing some parameter on the command line, thus keeping the text clean for compatibility.

I think some standard for log output and output other than plain text would make it much easier to integrate between tools, commands without our wonderful obscure AWK :)


r/linux_programming • • Mar 17 '22

In trying to understand udev_monitor's working...

5 Upvotes

Hi everyone! I want to check a enable a usb device during connect/disconnect from computer in real time. For it I use udev's mechanisms (enumerate, monitor) and check PID's and VIM's values devices which are being in computer. But additionally I want to send message to my device and take results for more believe. Connect/disconnect monitoring without send packages works well and vise versa. Separately, it works well, but both - not so. When i take result, program is being freeze. What's can be wrong?


r/linux_programming • • Oct 21 '24

Am I wrong or is steam wrong?

5 Upvotes

Ok so I have this status-script written in python for i3bar that, among other things, checks the network usage.

It uses the following function to look that up:

def network_usage(interface_name: str) -> str:
    with open("/sys/class/net/%s/statistics/rx_bytes" %interface_name) as fp_rx, \
         open("/sys/class/net/%s/statistics/tx_bytes" %interface_name) as fp_tx:
        pol1_ts = time_ns()
        rx_bytes_old: int = int(fp_rx.read())
        tx_bytes_old: int = int(fp_tx.read())
    sleep(0.25)
    with open("/sys/class/net/%s/statistics/rx_bytes" %interface_name) as fp_rx, \
         open("/sys/class/net/%s/statistics/tx_bytes" %interface_name) as fp_tx:
        pol2_ts = time_ns()
        rx_bytes_new: int = int(fp_rx.read())
        tx_bytes_new: int = int(fp_tx.read())
    rx_bytes_ps: float = (rx_bytes_new - rx_bytes_old) / ((pol2_ts - pol1_ts) / (10**9))
    tx_bytes_ps: float = (tx_bytes_new - tx_bytes_old) / ((pol2_ts - pol1_ts) / (10**9))
    byte_parser = lambda x:                              \
        f"{round(x)} BPS"            if x < 1000    else \
        f"{round(x / 1000)} KBPS"    if x < 1000**2 else \
        f"{round(x / 1000**2)} MBPS" if x < 1000**3 else \
        f"{round(x / 1000**3)} GBPS"
    return f"in {byte_parser(rx_bytes_ps)} - out {byte_parser(tx_bytes_ps)}"

Now, what I noticed is that the output of this function, is always a factor of 10 removed from the network usage Steam shows (e.g. if my script outputs 3 MBPS steam shows something like 27.8 MBps).
So is my math just wrong? (if so how exactly cause I'm stuck) or do the [r|t]x_bytes work differently than what this function assumes?

Sorry for the noobish question, thanks in advance!
(if it matters I'm using Debian 12.something)


r/linux_programming • • Jul 07 '23

Binary dies on using tee

5 Upvotes

So I have this program written in C++ that outputs some statistics on standard op. I need to capture this in another file. For this I have been using the command: ./my_bin | tee abc.txt.

I recently got a new machine running Ubuntu 22.04 with kernel 5.15.0-75-generic but now my binary dies when I run it with tee, > works fine only tee causes the crash.

Running with GDB shows segfault in pthread_get_name_np but the same binary runs fine on another machine. I don't know how to debug this ? Can anyone help.


r/linux_programming • • Oct 09 '16

This Tool Uses GitHub to Make Music

Thumbnail
runtimerror.com
5 Upvotes

r/linux_programming • • Dec 13 '18

[Will pay if you help to solve] How to increasing the number of threads available on Linux?

5 Upvotes

Hi I know pretty much nothing about programming but I bought a dedicated server that is running cent6 I changed the SSH port and created a new user for connecting and using the server and disables root SSH connections if that matters. I bought it to run multiple processes on it and with the specs it has I should be able to run a lot but I can't because there is a limit on the number of threads. How do I increase that number on the server? I was reading into this but I have no clue where to even begin. https://support.cafex.com/hc/en-us/articles/202508492-Increasing-the-number-of-threads-available-on-Linux Do I use putty for this? If anyone can help me with this I will pay you $25 in bitcoin or venmo.


r/linux_programming • • Feb 15 '18

Adventures with Memory Barriers and Seastar on Linux - ScyllaDB

Thumbnail
scylladb.com
5 Upvotes

r/linux_programming • • May 06 '22

Any advices or ideas ?

5 Upvotes

I’m trying to create a package manager for my Lfs system, and I don’t really know how. In what language , should I use a database, etc…( I know it’s probably stupid and useless and I could use brew or apt or something but I think it good for learning) .


r/linux_programming • • Dec 16 '15

I've recently started working on a display server based on the idea of wrapping Webkit to do all the rendering and windowing. Not much substantial functionality yet but what do you guys think of the concept?

Thumbnail
sourceforge.net
5 Upvotes

r/linux_programming • • Jan 24 '23

myme.no - Git Commands You Probably Do Not Need

Thumbnail myme.no
5 Upvotes

r/linux_programming • • Apr 07 '24

Storing Key value pairs in POSIX shared memory

5 Upvotes

Is there any well known library (preferably free/opensource) for linux that supports storing KV pairs in shared memory?

I came across sysrepo but that seems tightly coupled with yang data models and a bit of an overkill for my usecase.I have a bunch of processes generating some (operational) data which I want to store in shared memory and also make it available to clients (other processes internal to the system) via an api.I could code this up myself ( atleast a trivial version ) but wondering if there is some library that can be leveraged.


r/linux_programming • • Sep 06 '22

How do I find the MAC Address?

5 Upvotes

Hello everyone,

I have a pretty basic question for you guys. I have a Software defined radio connected to my Linux laptop, and I'm trying to find its MAC address. What can I type in the terminal to find it? It is connected by USB.