Search Results

Search found 1620 results on 65 pages for 'proc'.

Page 1/65 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to change SMP affinity of an IRQ on Ubuntu domU inside Xen XCP?

    - by Alexander Gladysh
    I'd like to change IRQ SMP affinity for reasons, outlined in this question: CPU0 is swamped with eth1 interrupts But I can't — I see Input/output error when I try to write to /proc/irq/*/smp_affinity. Please point me to the HOWTO on the matter. (A formal reference on /proc/irq/*/ would be cool as well.) Gory details: Note that this is a VM inside an Ubuntu-based Xen XCP host. $ uname -a Linux MYHOST 2.6.38-15-virtual #59-Ubuntu SMP Fri Apr 27 16:40:18 UTC 2012 i686 i686 i386 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty $ sudo cat /proc/irq/*/smp_affinity 01 01 01 01 01 80 80 80 80 80 80 40 40 40 40 40 40 20 20 20 20 20 20 10 10 10 10 10 10 08 08 08 08 08 08 04 04 04 04 04 04 02 02 02 02 02 02 01 01 01 01 01 01 Update. The error details: $ N=$(grep -c processor /proc/cpuinfo) $ echo $N 8 $ printf %x $((2**N-1)) ff $ printf %x $((2**N-1)) | sudo tee /proc/irq/*/smp_affinity fftee: /proc/irq/288/smp_affinity: Input/output error tee: /proc/irq/289/smp_affinity: Input/output error tee: /proc/irq/290/smp_affinity: Input/output error tee: /proc/irq/291/smp_affinity: Input/output error tee: /proc/irq/292/smp_affinity: Input/output error tee: /proc/irq/293/smp_affinity: Input/output error tee: /proc/irq/294/smp_affinity: Input/output error tee: /proc/irq/295/smp_affinity: Input/output error tee: /proc/irq/296/smp_affinity: Input/output error tee: /proc/irq/297/smp_affinity: Input/output error tee: /proc/irq/298/smp_affinity: Input/output error tee: /proc/irq/299/smp_affinity: Input/output error tee: /proc/irq/300/smp_affinity: Input/output error tee: /proc/irq/301/smp_affinity: Input/output error tee: /proc/irq/302/smp_affinity: Input/output error tee: /proc/irq/303/smp_affinity: Input/output error tee: /proc/irq/304/smp_affinity: Input/output error tee: /proc/irq/305/smp_affinity: Input/output error tee: /proc/irq/306/smp_affinity: Input/output error tee: /proc/irq/307/smp_affinity: Input/output error tee: /proc/irq/308/smp_affinity: Input/output error tee: /proc/irq/309/smp_affinity: Input/output error tee: /proc/irq/310/smp_affinity: Input/output error tee: /proc/irq/311/smp_affinity: Input/output error tee: /proc/irq/312/smp_affinity: Input/output error tee: /proc/irq/313/smp_affinity: Input/output error tee: /proc/irq/314/smp_affinity: Input/output error tee: /proc/irq/315/smp_affinity: Input/output error tee: /proc/irq/316/smp_affinity: Input/output error tee: /proc/irq/317/smp_affinity: Input/output error tee: /proc/irq/318/smp_affinity: Input/output error tee: /proc/irq/319/smp_affinity: Input/output error tee: /proc/irq/320/smp_affinity: Input/output error tee: /proc/irq/321/smp_affinity: Input/output error tee: /proc/irq/322/smp_affinity: Input/output error tee: /proc/irq/323/smp_affinity: Input/output error tee: /proc/irq/324/smp_affinity: Input/output error tee: /proc/irq/325/smp_affinity: Input/output error tee: /proc/irq/326/smp_affinity: Input/output error tee: /proc/irq/327/smp_affinity: Input/output error tee: /proc/irq/328/smp_affinity: Input/output error tee: /proc/irq/329/smp_affinity: Input/output error tee: /proc/irq/330/smp_affinity: Input/output error tee: /proc/irq/331/smp_affinity: Input/output error tee: /proc/irq/332/smp_affinity: Input/output error tee: /proc/irq/333/smp_affinity: Input/output error tee: /proc/irq/334/smp_affinity: Input/output error tee: /proc/irq/335/smp_affinity: Input/output error Update. irqbalance is running: $ sudo service irqbalance status irqbalance start/running, process 560

    Read the article

  • Ruby proc vs lambda in initialize()

    - by Jimmy Chu
    I found out this morning that proc.new works in a class initialize method, but not lambda. Concretely, I mean: class TestClass attr_reader :proc, :lambda def initialize @proc = Proc.new {puts "Hello from Proc"} @lambda = lambda {puts "Hello from lambda"} end end c = TestClass.new c.proc.call c.lambda.call In the above case, the result will be: Hello from Proc test.rb:14:in `<main>': undefined method `call' for nil:NilClass (NoMethodError) Why is that? Thanks!

    Read the article

  • Get local network interface addresses using only proc?

    - by Matt Joiner
    How can I obtain the (IPv4) addresses for all network interfaces using only proc? After some extensive investigation I've discovered the following: ifconfig makes use of SIOCGIFADDR, which requires open sockets and advance knowledge of all the interface names. It also isn't documented in any manual pages on Linux. proc contains /proc/net/dev, but this is a list of interface statistics. proc contains /proc/net/if_inet6, which is exactly what I need but for IPv6. Generally interfaces are easy to find in proc, but actual addresses are very rarely used except where explicitly part of some connection. There's a system call called getifaddrs, which is very much a "magical" function you'd expect to see in Windows. It's also implemented on BSD. However it's not very text-oriented, which makes it difficult to use from non-C languages.

    Read the article

  • File descriptor linked to socket or pipe in proc

    - by primero
    i have a question regarding the file descriptors and their linkage in the proc file system. I've observed that if i list the file descriptors of a certain process from proc ls -la /proc/1234/fd i get the following output: lr-x------ 1 root root 64 Sep 13 07:12 0 -> /dev/null l-wx------ 1 root root 64 Sep 13 07:12 1 -> /dev/null l-wx------ 1 root root 64 Sep 13 07:12 2 -> /dev/null lr-x------ 1 root root 64 Sep 13 07:12 3 -> pipe:[2744159739] l-wx------ 1 root root 64 Sep 13 07:12 4 -> pipe:[2744159739] lrwx------ 1 root root 64 Sep 13 07:12 5 -> socket:[2744160313] lrwx------ 1 root root 64 Sep 13 07:12 6 -> /var/lib/log/some.log I get the meaning of a file descriptor and i understand from my example the file descriptors 0 1 2 and 6, they are tied to physical resources on my computer, and also i guess 5 is connected to some resource on the network(because of the socket), but what i don't understand is the meaning of the numbers in the brackets. Do the point to some property of the resource? Also why are some of the links broken? And lastly as long as I asked a question already :) what is pipe?

    Read the article

  • How to create proc under /proc/driver?

    - by Mustika_wiguna
    I want to create a proc file under /proc/driver directory. I would like to use a macro like proc_root_driver (or something else provided) rather than use "driver/MODULE_NAME" explicitly. I use create_proc_entry : ... struct proc_dir_entry *simpleproc_fops_entry; simpleproc_fops_entry = create_proc_entry(MODULE_NAME, 0400, NULL /* proc_root_dir */); ... After googling, I found suggestion to use proc_root_driver, but when I use it, error "proc_root_driver undeclared in this function". And also, proc_root_driver is not available in linux/proc_fs.h. I have tried to declare structure like this: struct proc_dir_entry proc_root; struct proc_dir_entry *proc_root_driver = &proc_root; Errors gone, but proc file didn't exist under /proc/driver or /proc Anyone here can help me? Thanks in advances.

    Read the article

  • why in /proc file system have this infomation

    - by liutaihua
    run: lsof|grep delete can find some process open fd, but system dis that it had to delete: mingetty 2031 root txt REG 8,2 15256 49021039 /sbin/mingetty (deleted) I look the /proce filesystem: ls -l /proc/[pid] lrwxrwxrwx 1 root root 0 9? 17 16:12 exe -> /sbin/mingetty (deleted) but actually, the executable(/sbin/mingetty) is normal at /sbin/mingetty path. and some soket like this situation: ls -l /proc/[pid]/fd 82 -> socket:[23716953] but, use the commands: netstat -ae|grep [socket id] can find it. why the OS display this infomation??

    Read the article

  • Reading a child process's /proc/pid/mem file from the parent

    - by Amittai Aviram
    In the program below, I am trying to cause the following to happen: Process A assigns a value to a stack variable a. Process A (parent) creates process B (child) with PID child_pid. Process B calls function func1, passing a pointer to a. Process B changes the value of variable a through the pointer. Process B opens its /proc/self/mem file, seeks to the page containing a, and prints the new value of a. Process A (at the same time) opens /proc/child_pid/mem, seeks to the right page, and prints the new value of a. The problem is that, in step 6, the parent only sees the old value of a in /proc/child_pid/mem, while the child can indeed see the new value in its /proc/self/mem. Why is this the case? Is there any way that I can get the parent to to see the child's changes to its address space through the /proc filesystem? #include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> #include <unistd.h> #define PAGE_SIZE 0x1000 #define LOG_PAGE_SIZE 0xc #define PAGE_ROUND_DOWN(v) ((v) & (~(PAGE_SIZE - 1))) #define PAGE_ROUND_UP(v) (((v) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1))) #define OFFSET_IN_PAGE(v) ((v) & (PAGE_SIZE - 1)) # if defined ARCH && ARCH == 32 #define BP "ebp" #define SP "esp" #else #define BP "rbp" #define SP "rsp" #endif typedef struct arg_t { int a; } arg_t; void func1(void * data) { arg_t * arg_ptr = (arg_t *)data; printf("func1: old value: %d\n", arg_ptr->a); arg_ptr->a = 53; printf("func1: address: %p\n", &arg_ptr->a); printf("func1: new value: %d\n", arg_ptr->a); } void expore_proc_mem(void (*fn)(void *), void * data) { off_t frame_pointer, stack_start; char buffer[PAGE_SIZE]; const char * path = "/proc/self/mem"; int child_pid, status; int parent_to_child[2]; int child_to_parent[2]; arg_t * arg_ptr; off_t child_offset; asm volatile ("mov %%"BP", %0" : "=m" (frame_pointer)); stack_start = PAGE_ROUND_DOWN(frame_pointer); printf("Stack_start: %lx\n", (unsigned long)stack_start); arg_ptr = (arg_t *)data; child_offset = OFFSET_IN_PAGE((off_t)&arg_ptr->a); printf("Address of arg_ptr->a: %p\n", &arg_ptr->a); pipe(parent_to_child); pipe(child_to_parent); bool msg; int child_mem_fd; char child_path[0x20]; child_pid = fork(); if (child_pid == -1) { perror("fork"); exit(EXIT_FAILURE); } if (!child_pid) { close(child_to_parent[0]); close(parent_to_child[1]); printf("CHILD (pid %d, parent pid %d).\n", getpid(), getppid()); fn(data); msg = true; write(child_to_parent[1], &msg, 1); child_mem_fd = open("/proc/self/mem", O_RDONLY); if (child_mem_fd == -1) { perror("open (child)"); exit(EXIT_FAILURE); } printf("CHILD: child_mem_fd: %d\n", child_mem_fd); if (lseek(child_mem_fd, stack_start, SEEK_SET) == (off_t)-1) { perror("lseek"); exit(EXIT_FAILURE); } if (read(child_mem_fd, buffer, sizeof(buffer)) != sizeof(buffer)) { perror("read"); exit(EXIT_FAILURE); } printf("CHILD: new value %d\n", *(int *)(buffer + child_offset)); read(parent_to_child[0], &msg, 1); exit(EXIT_SUCCESS); } else { printf("PARENT (pid %d, child pid %d)\n", getpid(), child_pid); printf("PARENT: child_offset: %lx\n", child_offset); read(child_to_parent[0], &msg, 1); printf("PARENT: message from child: %d\n", msg); snprintf(child_path, 0x20, "/proc/%d/mem", child_pid); printf("PARENT: child_path: %s\n", child_path); child_mem_fd = open(path, O_RDONLY); if (child_mem_fd == -1) { perror("open (child)"); exit(EXIT_FAILURE); } printf("PARENT: child_mem_fd: %d\n", child_mem_fd); if (lseek(child_mem_fd, stack_start, SEEK_SET) == (off_t)-1) { perror("lseek"); exit(EXIT_FAILURE); } if (read(child_mem_fd, buffer, sizeof(buffer)) != sizeof(buffer)) { perror("read"); exit(EXIT_FAILURE); } printf("PARENT: new value %d\n", *(int *)(buffer + child_offset)); close(child_mem_fd); printf("ENDING CHILD PROCESS.\n"); write(parent_to_child[1], &msg, 1); if (waitpid(child_pid, &status, 0) == -1) { perror("waitpid"); exit(EXIT_FAILURE); } } } int main(void) { arg_t arg; arg.a = 42; printf("In main: address of arg.a: %p\n", &arg.a); explore_proc_mem(&func1, &arg.a); return EXIT_SUCCESS; } This program produces the output below. Notice that the value of a (boldfaced) differs between parent's and child's reading of the /proc/child_pid/mem file. In main: address of arg.a: 0x7ffffe1964f0 Stack_start: 7ffffe196000 Address of arg_ptr-a: 0x7ffffe1964f0 PARENT (pid 20376, child pid 20377) PARENT: child_offset: 4f0 CHILD (pid 20377, parent pid 20376). func1: old value: 42 func1: address: 0x7ffffe1964f0 func1: new value: 53 PARENT: message from child: 1 CHILD: child_mem_fd: 4 PARENT: child_path: /proc/20377/mem CHILD: new value 53 PARENT: child_mem_fd: 7 PARENT: new value 42 ENDING CHILD PROCESS.

    Read the article

  • Errors with nginx: proc must be mounted. Why do these happen?

    - by Crashalot
    We see these errors in our nginx log error file. What causes them, and what is the right way to fix them on an ongoing basis (as opposed to running "mount /proc /proc -t proc")? We're on nginx 1.4.1 and Passenger 4.0.5. [ 2013-06-28 08:22:17.7621 2739/7ff58d8f3700 Pool2/SmartSpawner.h:301 ]: Preloader for /home/p/p started on PID 5181, listening on unix:/tmp/passenger.1.0.2735/generation-0/backends/preloader.5181 [ 2013-06-28 12:59:31.1651 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] Error: /proc must be mounted [ 2013-06-28 12:59:31.1651 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] To mount /proc at boot you need an /etc/fstab line like: [ 2013-06-28 12:59:31.1651 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] /proc /proc proc defaults [ 2013-06-28 12:59:31.1651 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] In the meantime, run "mount /proc /proc -t proc" [ 2013-06-28 12:59:31.1652 2739/7ff58d871700 Pool2/Spawner.h:739 ]: [App 19777 stdout] [ 2013-06-28 12:59:34.6642 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] Error: /proc must be mounted [ 2013-06-28 12:59:34.6643 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] To mount /proc at boot you need an /etc/fstab line like: [ 2013-06-28 12:59:34.6643 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] /proc /proc proc defaults [ 2013-06-28 12:59:34.6643 2739/7ff59078f700 Pool2/Spawner.h:159 ]: [App 19777 stderr] In the meantime, run "mount /proc /proc -t proc" [ 2013-06-28 12:59:34.6651 2739/7ff58d871700 Pool2/SmartSpawner.h:301 ]: Preloader for /home/p/p started on PID 19777, listening on unix:/tmp/passenger.1.0.2735/generation-0/backends/preloader.19777

    Read the article

  • Lot of "file not found" when using sudo find / -type s

    - by Andrea Moro
    In the attempt to understand why I keep getting the following error error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' while using the command sudo find / -type s the terminal prompted something like this find: ‘/proc/31348/task/31348/fd/5’: No such file or directory find: ‘/proc/31348/task/31348/fdinfo/5’: No such file or directory find: ‘/proc/31348/fd/5’: No such file or directory find: ‘/proc/31348/fdinfo/5’: No such file or directory What does this mean?

    Read the article

  • PROC FCMP PROBLEM

    - by Bruno
    I copy the code from a paper that i found on internet. proc fcmp outlib=work.funcs.Test; function whatAmI(); return(42); endsub; quit; options cmplib=work.funcs; data null; rci = whatAmI(); put rci=; /* should be 42 */ run; When I execute the code, it show the message: ERROR 68-185: The function WHATAMI is unknown, or cannot be accessed. I tried other functions and always show this message. I change the libname, but nothing work. What´s wrong?

    Read the article

  • invoking proc with instance_eval with arguments

    - by dorelal
    I know this works proc = Proc.new do puts self.hi + ' world' end class Usa def hi "Hello!" end end Usa.new.instance_eval &proc However I want to pass arguments to proc. So I tried this which does not work. Can anyone help me make following work. proc = Proc.new do |greeting| puts self.hi + gretting end class Usa def hi "Hello!" end end Usa.new.instance_eval &proc, 'world' # does not work Usa.new.instance_eval &proc('world') # does not work

    Read the article

  • Loading the 'pktgen' module on Ubuntu Server

    - by StackedCrooked
    I would like to enable and use the pktgen module on Ubuntu Server. I have enabed the module by adding a line containing 'pktgen' to the /etc/modules file. After rebooting it seems that the module is successfully loaded because the directory /proc/net/pktgen exists. However when trying to run the first sample I get these errors: root@ubuntu:~# bash ./pktgen.conf-1-1 Removing all devices Adding eth4 Setting max_before_softirq 10000 Configuring /proc/net/pktgen/eth4 ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory Running... ctrl^C to stop Done It turns out the script simply unable to write a file to the /proc/net/pktgen directory. When I try this manually it fails as well: root@ubuntu:~# cd /proc/net/pktgen/ root@ubuntu:/proc/net/pktgen# touch eth4 touch: cannot touch `eth4': No such file or directory Can anyone help me make it work? I'm using Ubuntu version: 2.6.32-21-server. Fixed I apologize for keeping this post not up to date. I was able to fix it. If I remember well the cause of the error was that eth4 did not exist, or did not have the 'online' status. Anyway, it is fixed now.

    Read the article

  • Should tripwire be entering /proc?

    - by dsadinoff
    When initializing the db with tripwire --init it spat out a bunch of errors pertaining to /proc: ### Warning: File system error. ### Filename: /proc/16982/fd/4 ### No such file or directory ### Continuing... ### Warning: File system error. ### Filename: /proc/16982/fdinfo/4 ### No such file or directory ### Continuing... ### Warning: File system error. ### Filename: /proc/16982/task/16982/fd/4 ### No such file or directory ### Continuing... ### Warning: File system error. ### Filename: /proc/16982/task/16982/fdinfo/4 ### No such file or directory ### Continuing... ### Warning: Duplicate object encountered. ### /proc/sys/net/ipv6/neigh This feels like noise. The twpol.txt file has the following clause: # # Critical devices # ( rulename = "Devices & Kernel information", severity = $(SIG_HI), ) { /dev -> $(Device) ; /proc -> $(Device) ; } Which, if I understand it right, is going to cause tripwire to care deeply about the entire contents of /proc. Shouldn't it just care about the static parts of /proc like the drivers and such, and not the per-pid stuff? Why does it ship like this?

    Read the article

  • mount dev, proc, sys in a chroot environment?

    - by Patrick
    I'm trying to create a Linux image with custom picked packages. I followed the guide here http://www.olpcnews.com/forum/index.php?topic=4766.0 However, when I tried to install some packages, it failed to configure due to missing the proc, sys, dev directories. So, I learned from other places that I need to "mount" the host proc, ... directories to my chroot environment. Though, I saw two syntax and am not sure which one to use. In host machine: mount --bind /proc <chroot dir>/proc and another syntax (in chroot envrionment): mount -t proc none /proc Which one should I use, and what are the difference? Edit: What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time on the real XO hardware, if I can build all the packages I need and just flash the image to the XO, I can save time and space.

    Read the article

  • How does the proc in the caches_action if clause get execute

    - by Sid
    I have a newbie kind of question which I cant get my head around. How does the Proc in the if condition of the caches_action get executed for the caches_action method. for example caches_action :show, :if=Proc.new{|x| something} what i dont get its how does this get called. I know i can execute a proc defined as proc= Proc.new by proc.call so i dont understand how this gets called. Second how do I pass conditions like if logged_in? I'd appreciate any help on this

    Read the article

  • Change permission to /proc/net/ip_conntrack on Ubuntu server 9.10

    - by bjarkef
    Hi I have a script that needs to extract certain information form the /proc/net/ip_conntrack file once in a while. I do not wish to run this script as the root user. Default permissions for the file is: $ ls -lah /proc/net/ip_conntrack -r--r----- 1 root root 0 2010-03-28 12:18 /proc/net/ip_conntrack I can change it with: sudo chmod o+r /proc/net/ip_conntrack But that does not stick after a reboot. Is there some configuration file for file-permissions in the /proc directory in Ubuntu Server 9.10? Or do I just have to stick a chmod line in some startup script?

    Read the article

  • Kernel module for /proc

    - by sb2367
    How to write a kernel module that creates a directory in /proc named mymod and a file in it name is mymodfile. This file should accept a number ranged from 1 to 3 when written into it and return the following messages when read based on the number already written into it: • 1: Current system time (in microseconds precision) • 2: System uptime • 3: Number of processes currently in the system “The Output” root@Paradise# echo 1 > /proc/mymod/mymodfile root@Paradise# cat /proc/mymod/mymodfile 08:30:24 342us root@Paradise# echo 2 > /proc/mymod/mymodfile root@Paradise# cat /proc/mymod/mymodfile up 1 day, 8 min root@Paradise# echo 3 > /proc/mymod/mymodfile root@Paradise# cat /proc/mymod/mymodfile process count: 48 please give me some hint how to write a kernel modules and how to compile and install it .

    Read the article

  • How to call stored proc from ASP.Net MVC stack via the ORM & return them in json?

    - by melaos
    Hi guys, i'm a total newbie with asp.net mvc and here's my jam: i have a 3 level list box which selection on box A shows options on box B and selection on box B will show the options for box C. I'm trying to do the whole thing in asp.net MVC and what i see is that the nerd dinner tutorial uses the ORM method. so i created a dbml to the database and drag the stored proc inside. i create a datacontext object but i don't quite know how to connect the result from the stored proce which should be multiple rows of data and make it into a json. so i can keep all the json data inside the html page and using jquery i could make the selection process faster. i don't expect the data inside the three boxes to change so often thus i think this method should be quite viable. Questions: So how do i get the stored proc part to return the data as json? i've noticed some tutorial online that the json return result part is at the controller and not at the model end. Why is that?

    Read the article

  • Laptop Brightness in Gnome and /proc - Thinkpad W510

    - by hakre
    I can set the brightness of my laptop screen already via /proc. I can read and change the value. Now I've set the value to 33 and then I went into gnome power management and enabled the option that it should reduce the backlight brightness being on battery. That works, the screen gets darker. If I now read out the current setting from /proc it still says it's 33. So I assume that there is another node in /proc to be used to control the brightness. The node I use so far is: /proc/acpi/video/VID/LCD0/brightness

    Read the article

  • Linux - Programmatically write to a proc file

    - by Zach
    I have found several examples online where we can create a proc file, assign read and write methods that are called every time the proc file is opened for read or written to. However, I can't seem to find any documentation on how to programatically write to a proc file. Ideally, I would like to add a timestamp with other user details every time the proc file is opened for read or for write. Again, I've found where I can add the read and write functions that are triggered when the proc file is opened, but I can't find documentation on how to actually write to a proc file programatically. This would be different from a regular IO read/write, correct?

    Read the article

  • Proc.new vs Lambda in Ruby

    - by piemesons
    Plese check this: def foo f = Proc.new { return "return from foo from inside proc" } f.call # control leaves foo here return "return from foo" end def bar f = lambda { return "return from lambda" } f.call # control does not leave bar here return "return from bar" end puts foo # prints "return from foo from inside proc" puts bar # prints "return from bar" Can anybody tell me what lambda is and what is Proc and whats the difference.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >