[solved] stat64() usage in C

Can someone tell me how to use the large file functions, especially stat64()? I always get
warning: implicit declaration of function 'stat64'
and for the struct stat64 named "filestat"
error: storage size of 'filestat' isn't known
I already crawled every page I found via google and tried with no success:
- compiling with -D_FILE_OFFSET_BITS=64
- #define __USE_LARGEFILE64
- #define _LARGEFILE_SOURCE
- #define _LARGEFILE64_SOURCE
Any suggestions? Thanks in advance!
lynix
Last edited by lynix (2009-10-23 21:11:22)

why not use just the stat instead of stat64 ??
i rly dont know what this c program need to do i'm a beginner c/c++ programmer, but at least i can use google and i found that use stat instead of stat64...
and i tried to and compiles without a problem, so i think it need to be good
1 /*
2 * =====================================================================================
3 *
4 * Filename: test.c
5 *
6 * Description:
7 *
8 * Version: 1.0
9 * Created: 10/23/2009 11:52:20 PM
10 * Revision: none
11 * Compiler: gcc
12 *
13 * Author: Czaka Hunor (), [email protected]
14 * Company:
15 *
16 * =====================================================================================
17 */
18
19 #include <sys/stat.h>
20
21 #define __USE_LARGEFILE64
22 #define _LARGEFILE_SOURCE
23 #define _LARGEFILE64_SOURCE
24
25 int main()
26 {
27 struct stat mystat;
28
29 stat("/etc/fstab", &mystat);
30
31 return 0;
32 }
┌─[ hybrid@arch ~ ]
└─[ $> gcc -Wall -c test.c
test.c: In function 'main':
test.c:27: error: storage size of 'mystat' isn't known
test.c:29: warning: implicit declaration of function '_stat64'
test.c:27: warning: unused variable 'mystat'
┌─[ hybrid@arch ~ ]
└─[ $> gcc -Wall -c test.c
┌─[ hybrid@arch ~ ]
└─[ $> gcc test.o -o test
┌─[ hybrid@arch ~ ]
└─[ $> ./test
┌─[ hybrid@arch ~ ]
└─[ $>
hope i helped

Similar Messages

  • [SOLVED] modprobe usage info displayed at boot

    This thread seems related to /sbin/modprobe runs at boot before udev [solved]
    I'm using mkinitcpio 0.7.2-1 on x86_64, my system is completely up-to-date, but somehow I seem to be still affected by FS#24766: I'm getting modprobe's usage info displayed at boot.
    My MODULES array in /etc/mkinitcpio.conf is empty and the file is unmodified.
    I have tried reinstalling mkinitcpio with no positive results.
    Any ideas? Thanks
    Last edited by kynikos (2011-07-31 18:59:41)

    Eheh, it worked, thanks! I wonder why reinstalling mkinitcpio didn't solve it then... well, nevermind

  • [SOLVED] Example usage of pyalpm library

    Hİ,
    I am trying to find my way around pyalpm library, but I couldn't be able to do much yet. So far, I have been able to get local database and sync databases but I couldn't be able to refresh databases, install/remove a new package etc.
    And also, it would be nice if someone explained to me the work flow of pyalpm, because so far I couldn't be able to fully understand what does exactly what.
    Thanks in advance
    Yaşar Arabacı
    Edit: I guess I just figured out everyday usage functionality of pyalpm. But I still need to see some pyalpm.transaction.init() examples. Especially, how are we passsing arguments to that. (e.g list, tuples, keywordargs,str??). And also, should I pass some arguments to pyalpm.transaction.prepare() or, just use it as it is?
    Edit:2
    Appearantly, pycman package have lots of them, so I am marking this thread solved.
    Last edited by yasar11732 (2011-07-01 23:16:21)

    I'm having the same issue. Has anyone found a solution?

  • [Solved] cpu usage 100%, it is bug of lxpanel

    My archlinux is on an old PIII machine.  Recently, I found its CPU usage is 100%.
    But, I don't know how to solve it.  I can not found out which is cpu eater.
    vmstat is 0 idle, but on top view, there are a few process with lower cpu usage.
    I've tried both kernel, both cause 100% cpu usage.
    kernel26 2.6.37.5-1
    kernel26-lts 2.6.32.36-1
    # vmstat 2 10
    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
    r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
    1  0      0 103060  26496 227192    0    0    52    38  202  425 56 41  1  3
    4  0      0 103300  26496 227196    0    0     0     0  192  439 54 47  0  0
    1  0      0 103300  26496 227196    0    0     0     0  303  589 64 36  0  0
    1  0      0 103316  26496 227196    0    0     0     0  367  656 64 37  0  0
    # top - 22:37:53 up 52 min,  2 users,  load average: 2.46, 1.87, 1.80
    Tasks:  81 total,   2 running,  79 sleeping,   0 stopped,   0 zombie
    Cpu(s): 57.9%us, 41.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  1.0%hi,  0.0%si,  0.0%st
    Mem:    495416k total,   385172k used,   110244k free,    25784k buffers
    Swap:        0k total,        0k used,        0k free,   224916k cached
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND         
    1152 root      20   0 70992  20m 5976 S 14.5  4.2   1:13.63 X               
    23680 dlin      20   0  109m  22m  13m S  7.2  4.6   1:43.47 chromium         
    1887 dlin      20   0  138m  12m 9848 S  6.9  2.6   0:12.89 lxterminal       
    1182 dlin      20   0 99848  11m 8904 S  3.9  2.3   2:42.20 lxpanel         
    1191 dlin      20   0  297m  43m  27m S  1.0  9.1   1:00.54 chromium         
    21399 dlin      20   0  4404 1144  888 R  0.7  0.2   0:00.02 menu-cache-gen   
        1 root      20   0  1712  608  548 S  0.3  0.1   0:17.09 init             
        4 root      20   0     0    0    0 S  0.3  0.0   0:02.20 ksoftirqd/0     
      419 root      20   0     0    0    0 D  0.3  0.0   0:02.82 usb-storage     
    1161 root      20   0  3648 1144  988 S  0.3  0.2   0:00.65 hald-addon-stor
    Last edited by dlin (2011-04-02 16:38:08)

    It seems that the problem occurs to me too! Could it be linked with libreoffice?
    I think I have permission in ~/.cache directory:
    ls -lh |grep .cache
    drwxr-xr-x 2 manu manu 4,0K 29 mars 2010 cache
    [11:21][manu@compal:~]$ ls -lh .cache
    total 36K
    drwx------ 2 manu manu 4,0K 19 oct. 15:56 dconf
    -rw-r--r-- 1 manu manu 12K 14 mars 11:52 event-sound-cache.tdb.12c7aa4c6ede9c34246c65044a475d7e.i686-pc-linux-gnu
    drwxr-xr-x 3 manu manu 4,0K 18 août 2010 geeqie
    drwx------ 3 manu manu 4,0K 22 sept. 2010 gegl-0.1
    drwxr-xr-x 2 manu manu 4,0K 12 sept. 2010 gogglesmm
    drwx------ 2 manu manu 4,0K 1 avril 19:49 menus
    drwx------ 3 manu manu 4,0K 11 déc. 18:42 vlc
    [11:21][manu@compal:~]$ ls -lh .cache/menus
    total 80K
    -rw------- 1 manu manu 38K 23 nov. 19:24 26a80813bb7494e1d982502af748aef6
    -rw------- 1 manu manu 38K 1 avril 19:49 757379b1865bb943a0541b554ffbb809
    lxpanel is linked with .cache/menus directory?
    I will try to delete .cache and see what happens!!

  • [Solved] mtp usage

    I have just started using mtp to transfer files to my mobile phone & it works fast & flawlessly (yeah!)
    My only concern is dismounting / disconnecting the phone when the transfer is complete.
    Q1 is this required ? will data be corrupted if I just unplug the usb cable?
    Q2 what command do I need to use ?
    I have searched everywhere for an answer to above, but am drawing a blank.
    ps not looking for suggestions of alternatives to mtp.
    Last edited by flipper T (2013-12-17 03:29:19)

    Found this post (here : http://forum.xda-developers.com/showthr … t=1469519)
    Galaxy Nexus uses MTP for file Transfers in contrast to older versions that uses USB mass storage (in effect emulating an USB-Stick).
    MTP is a lot safer, because the PC doesn't get to the lowlevel filesystem details, so it can't ruin them with a bad unplug.
    When using MTP worst cases are when the file is still transferring it might not get saved completely. Well in theory android could get confused, but i don't think that will happen.
    With USB mass storage as protocol the worst case is an unreadable file system, but that protocol isn't available on stock google nexus.
    In short: It's save.
    I don't do windows, but maybe that's why windows doesn't even show the icon: It not needed.
    ...seems applicable / will mark as solved.
    Last edited by flipper T (2013-12-17 03:28:59)

  • [SOLVED] Remote usage

    I'm kind of used to VNC and TeamViewer to give support to my machines but I want to ask for something completely different.
    I want to setup a headless machine and remotely (from what is usually called a dumb terminal) connect to the machine and use its window manager and everything as if i was phisically using that machine with the keyboard and mouse plugged on it, but via network..... Is this so uncommon or difficult?
    Thanks.
    Last edited by Xi0N (2012-12-23 22:17:50)

    I am using xvfb with x11vnc and ssh. I tried vncserver before but it could not handle i3 (no xkb extension or something like that).
    On remote machine (under screen / tmux so it won't dissapear if i'm disconnected):
    Xvfb :1 -nolisten tcp -screen 0 1280x1024x16
    DISPLAY=:1 i3
    x11vnc -display :1 -localhost
    On local machine:
    ssh -L 5900:localhost:5900
    (or putty: connection -> ssh -> tunnels)
    This gives you encrypted persistent vnc session. On reconnect you need to start x11vnc once again.

  • [solved]Grep usage

    So if I'm reading the man pages right if I run something like 'grep -f awesome'  It'll search the whole filesystem for any file with 'awesome'
    Last edited by jedijimi (2014-03-23 19:19:49)

    No.
    -f FILE, --file=FILE
                  Obtain patterns from FILE, one per line.  The empty file contains zero patterns, and therefore matches nothing.  (-f is specified by POSIX.)
    The -f option is for when you have a file containing the patterns you wish to match against...
    $ grep alias .bashrc
    # Source ~/.bash_aliases
    if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
    $ echo alias > patterns
    $ grep -f patterns .bashrc
    # Source ~/.bash_aliases
    if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases

  • [SOLVED] swap usage when there is plenty of ram availibale

    Hi guys, I'm not sure if this is correct subforum, but here is the question
    By default linux kernel uses swap partition even if there is lots of ram availiable. What's the purpose of this? And is there a way to turn this off in Arch.
    Last edited by ogronom (2008-11-03 18:59:10)

    found 2 articles (pretty old) about this issue
    http://www.beranger.org/index.php?article=1547&page=3k
    http://lwn.net/Articles/83588/

  • [SOLVED] Check for old configuration files and directories in ~/

    Hello,
    Since I started with Arch I tried and uninstalled a few programs and would like to check for possible left overs in ~/
    I tried the "lostfiles" script, but it does not seem to check the home directory. Then I followed this: https://wiki.archlinux.org/index.php/Pa … ny_package - But using the suggested alias in my bash, it gives me the below:
    $ pacman-disowned-files
    [sudo] password for [my user]:
    bash: -path: command not found
    bash: /root: Is a directory
    bash: -print: command not found
    What am I doing wrong?
    Regards
    Martin
    Last edited by onslow77 (2015-02-04 23:52:44)

    Hello,
    ohh, I see, I need to do this (in directory where I put the script)
    sh pacman-disowned -files > test.txt
    That solved the usage of the commands, but it does not however list files [in the test.txt file] that do not belong to any package in my ~/ directory (I put a dummy file in my ~/ to see if it got noticed) - but it did not. So how can I list files and directories in my ~/ directory that is not put there by any package that currently is installed?
    Regards
    Martin
    Last edited by onslow77 (2015-02-04 22:49:11)

  • Aggregating data loaded into different hierarchy levels

    I have some problems when i try to aggregate a variable called PRUEBA2_IMPORTE dimensinated by time dimension (parent-child type).
    I read the help in DML Reference of the OLAP Worksheet and it said the follow:
    When data is loaded into dimension values that are at different levels of a hierarchy, then you need to be careful in how you set status in the PRECOMPUTE clause in a RELATION statement in your aggregation specification. Suppose that a time dimension has a hierarchy with three levels: months aggregate into quarters, and quarters aggregate into years. Some data is loaded into month dimension values, while other data is loaded into quarter dimension values. For example, Q1 is the parent of January, February, and March. Data for March is loaded into the March dimension value. But the sum of data for January and February is loaded directly into the Q1 dimension value. In fact, the January and February dimension values contain NA values instead of data. Your goal is to add the data in March to the data in Q1. When you attempt to aggregate January, February, and March into Q1, the data in March will simply replace the data in Q1. When this happens, Q1 will only contain the March data instead of the sum of January, February, and March. To aggregate data that is loaded into different levels of a hierarchy, create a valueset for only those dimension values that contain data. DEFINE all_but_q4 VALUESET time
    LIMIT all_but_q4 TO ALL
    LIMIT all_but_q4 REMOVE 'Q4'
    Within the aggregation specification, use that valueset to specify that the detail-level data should be added to the data that already exists in its parent, Q1, as shown in the following statement. RELATION time.r PRECOMPUTE (all_but_q4)
    How to do it this for more than one dimension?
    Above i wrote my case of study:
    DEFINE T_TIME DIMENSION TEXT
    T_TIME
    200401
    200402
    200403
    200404
    200405
    200406
    200407
    200408
    200409
    200410
    200411
    2004
    200412
    200501
    200502
    200503
    200504
    200505
    200506
    200507
    200508
    200509
    200510
    200511
    2005
    200512
    DEFINE T_TIME_PARENTREL RELATION T_TIME <T_TIME T_TIME_HIERLIST>
    -----------T_TIME_HIERLIST-------------
    T_TIME H_TIME
    200401 2004
    200402 2004
    200403 2004
    200404 2004
    200405 2004
    200406 2004
    200407 2004
    200408 2004
    200409 2004
    200410 2004
    200411 2004
    2004 NA
    200412 2004
    200501 2005
    200502 2005
    200503 2005
    200504 2005
    200505 2005
    200506 2005
    200507 2005
    200508 2005
    200509 2005
    200510 2005
    200511 2005
    2005     NA
    200512 2005
    DEFINE PRUEBA2_IMPORTE FORMULA DECIMAL <T_TIME>
    EQ -
    aggregate(this_aw!PRUEBA2_IMPORTE_STORED using this_aw!OBJ262568349 -
    COUNTVAR this_aw!PRUEBA2_IMPORTE_COUNTVAR)
    T_TIME PRUEBA2_IMPORTE
    200401 NA
    200402 NA
    200403 2,00
    200404 2,00
    200405 NA
    200406 NA
    200407 NA
    200408 NA
    200409 NA
    200410 NA
    200411 NA
    2004 4,00 ---> here its right!! but...
    200412 NA
    200501 5,00
    200502 15,00
    200503 NA
    200504 NA
    200505 NA
    200506 NA
    200507 NA
    200508 NA
    200509 NA
    200510 NA
    200511 NA
    2005 10,00 ---> here must be 30,00 not 10,00
    200512 NA
    DEFINE PRUEBA2_IMPORTE_STORED VARIABLE DECIMAL <T_TIME>
    T_TIME PRUEBA2_IMPORTE_STORED
    200401 NA
    200402 NA
    200403 NA
    200404 NA
    200405 NA
    200406 NA
    200407 NA
    200408 NA
    200409 NA
    200410 NA
    200411 NA
    2004 NA
    200412 NA
    200501 5,00
    200502 15,00
    200503 NA
    200504 NA
    200505 NA
    200506 NA
    200507 NA
    200508 NA
    200509 NA
    200510 NA
    200511 NA
    2005 10,00
    200512 NA
    DEFINE OBJ262568349 AGGMAP
    AGGMAP
    RELATION this_aw!T_TIME_PARENTREL(this_aw!T_TIME_AGGRHIER_VSET1) PRECOMPUTE(this_aw!T_TIME_AGGRDIM_VSET1) OPERATOR SUM -
    args DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES
    AGGINDEX NO
    CACHE NONE
    END
    DEFINE T_TIME_AGGRHIER_VSET1 VALUESET T_TIME_HIERLIST
    T_TIME_AGGRHIER_VSET1 = (H_TIME)
    DEFINE T_TIME_AGGRDIM_VSET1 VALUESET T_TIME
    T_TIME_AGGRDIM_VSET1 = (2005)
    Regards,
    Mel.

    Mel,
    There are several different types of "data loaded into different hierarchy levels" and the aproach to solving the issue is different depending on the needs of the application.
    1. Data is loaded symmetrically at uniform mixed levels. Example would include loading data at "quarter" in historical years, but at "month" in the current year, it does /not/ include data loaded at both quarter and month within the same calendar period.
    = solved by the setting of status, or in 10.2 or later with the load_status clause of the aggmap.
    2. Data is loaded at both a detail level and it's ancestor, as in your example case.
    = the aggregate command overwrites aggregate values based on the values of the children, this is the only repeatable thing that it can do. The recomended way to solve this problem is to create 'self' nodes in the hierarchy representing the data loaded at the aggregate level, which is then added as one of the children of the aggregate node. This enables repeatable calculation as well as auditability of the resultant value.
    Also note the difference in behavior between the aggregate command and the aggregate function. In your example the aggregate function looks at '2005', finds a value and returns it for a result of 10, the aggregate command would recalculate based on january and february for a result of 20.
    To solve your usage case I would suggest a hierarchy that looks more like this:
    DEFINE T_TIME_PARENTREL RELATION T_TIME <T_TIME T_TIME_HIERLIST>
    -----------T_TIME_HIERLIST-------------
    T_TIME H_TIME
    200401 2004
    200402 2004
    200403 2004
    200404 2004
    200405 2004
    200406 2004
    200407 2004
    200408 2004
    200409 2004
    200410 2004
    200411 2004
    200412 2004
    2004_SELF 2004
    2004 NA
    200501 2005
    200502 2005
    200503 2005
    200504 2005
    200505 2005
    200506 2005
    200507 2005
    200508 2005
    200509 2005
    200510 2005
    200511 2005
    200512 2005
    2005_SELF 2005
    2005 NA
    Resulting in the following cube:
    T_TIME PRUEBA2_IMPORTE
    200401 NA
    200402 NA
    200403 2,00
    200404 2,00
    200405 NA
    200406 NA
    200407 NA
    200408 NA
    200409 NA
    200410 NA
    200411 NA
    200412 NA
    2004_SELF NA
    2004 4,00
    200501 5,00
    200502 15,00
    200503 NA
    200504 NA
    200505 NA
    200506 NA
    200507 NA
    200508 NA
    200509 NA
    200510 NA
    200511 NA
    200512 NA
    2005_SELF 10,00
    2005 30,00
    3. Data is loaded at a level based upon another dimension; for example product being loaded at 'UPC' in EMEA, but at 'BRAND' in APAC.
    = this can currently only be solved by issuing multiple aggregate commands to aggregate the different regions with different input status, which unfortunately means that it is not compatable with compressed composites. We will likely add better support for this case in future releases.
    4. Data is loaded at both an aggregate level and a detail level, but the calculation is more complicated than a simple SUM operator.
    = often requires the use of ALLOCATE in order to push the data to the leaves in order to correctly calculate the aggregate values during aggregation.

  • I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail. Help!

    I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail.   Both iTunes  and the phone say that 2.1 gigs are being used, even though the phone now has nothing on it.  What is going on?

    Yeah it works fine over wifi the problem is when I try to use it over my 3G. It's really stressing me out now.

  • [SOLVED]Wine 100% cpu usage in some games

    I'm using wine for almost 2yrs now, only to play counterstrike which it runs flawlessly. I today installed nfs undercover and it seems that cpu usage is always 100%(due to nfs.exe). From the nvidia control center I can see that the gpu temp is really low from which I can guess that the gpu is underutilized and so the game runs sluggishly. As I dont game that much in wine, I'm asking u guys that Is it supposed to be like this? or are there any tweaks?
    Last edited by Soumyadeep (2010-09-09 10:46:46)

    Soumyadeep wrote:thank u guys for ur replies, I guess wine is not ready yet for hardcore games but does a good job with wow, cs etc, marking this as solved.
    Generally it is though. What's a 'hardcore' game? I play HoN through wine (long story) and I know that big resource hog NWN2 ran just the same FPS in wine as on the windows install. Those are even DirectX games, the extra cost of DirectX->OpenGL conversion is offset by the fact that you don't have to run a virus scanner and all those junk apps a typical windows install needs.
    IMO wine is made for games of all kind. Now if only it worked better with Office and the Adobe apps....

  • (Solved) systemd-journald extremely high CPU usage

    I started noticing this problem a few days ago, but I thought it was because I was running too much with too little RAM. But when running nothing more than a KDE desktop, my CPU usage bounces between 50% and 100%, making things laggy. It looks like systemd-journald is to blame, as it is using 50% of the CPU. This is an AMD Phenom II dual core, so this definitely shouldn't be happening. I noticed journal logs were more than 2 GB, so I deleted everything within /var/log/journal/. Rebooted, no change, so I disabled journal storage, but that did not solve the problem.
    Nothing in the logs looks like a problem to me:
    $ sudo journalctl
    -- Logs begin at Tue 2013-03-12 17:31:37 PDT, end at Tue 2013-03-12 18:15:56 PDT. --
    Mar 12 17:31:37 silverstone systemd-journal[149]: Allowing runtime journal files to grow to 298.6M.
    Mar 12 17:31:37 silverstone kernel: Initializing cgroup subsys cpuset
    Mar 12 17:31:37 silverstone kernel: Initializing cgroup subsys cpu
    Mar 12 17:31:37 silverstone kernel: Linux version 3.7.10-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (G
    Mar 12 17:31:37 silverstone kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=31669ea0-76db
    Mar 12 17:31:37 silverstone kernel: e820: BIOS-provided physical RAM map:
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x00000000000e2000-0x00000000000fffff] reserved
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000cff8ffff] usable
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x00000000cff90000-0x00000000cff9dfff] ACPI data
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x00000000cff9e000-0x00000000cffdffff] ACPI NVS
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x00000000cffe0000-0x00000000cfffffff] reserved
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x00000000ffe00000-0x00000000ffffffff] reserved
    Mar 12 17:31:37 silverstone kernel: BIOS-e820: [mem 0x0000000100000000-0x00000001afffffff] usable
    Mar 12 17:31:37 silverstone kernel: NX (Execute Disable) protection: active
    Mar 12 17:31:37 silverstone kernel: SMBIOS 2.5 present.
    Mar 12 17:31:37 silverstone kernel: DMI: MSI MS-7642/890GXM-G65 (MS-7642) , BIOS V1.2 03/31/2010
    Mar 12 17:31:37 silverstone kernel: e820: update [mem 0x00000000-0x0000ffff] usable ==> reserved
    Mar 12 17:31:37 silverstone kernel: e820: remove [mem 0x000a0000-0x000fffff] usable
    Mar 12 17:31:37 silverstone kernel: No AGP bridge found
    Mar 12 17:31:37 silverstone kernel: e820: last_pfn = 0x1b0000 max_arch_pfn = 0x400000000
    Mar 12 17:31:37 silverstone kernel: MTRR default type: uncachable
    Mar 12 17:31:37 silverstone kernel: MTRR fixed ranges enabled:
    Mar 12 17:31:37 silverstone kernel: 00000-9FFFF write-back
    Mar 12 17:31:37 silverstone kernel: A0000-EFFFF uncachable
    Mar 12 17:31:37 silverstone kernel: F0000-FFFFF write-protect
    Mar 12 17:31:37 silverstone kernel: MTRR variable ranges enabled:
    Mar 12 17:31:37 silverstone kernel: 0 base 000000000000 mask FFFF80000000 write-back
    Mar 12 17:31:37 silverstone kernel: 1 base 000080000000 mask FFFFC0000000 write-back
    Mar 12 17:31:37 silverstone kernel: 2 base 0000C0000000 mask FFFFF0000000 write-back
    Mar 12 17:31:37 silverstone kernel: 3 disabled
    Mar 12 17:31:37 silverstone kernel: 4 disabled
    Mar 12 17:31:37 silverstone kernel: 5 disabled
    Mar 12 17:31:37 silverstone kernel: 6 disabled
    Mar 12 17:31:37 silverstone kernel: 7 disabled
    Mar 12 17:31:37 silverstone kernel: TOM2: 00000001b0000000 aka 6912M
    Mar 12 17:31:37 silverstone kernel: x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
    Mar 12 17:31:37 silverstone kernel: e820: update [mem 0xd0000000-0xffffffff] usable ==> reserved
    Mar 12 17:31:37 silverstone kernel: e820: last_pfn = 0xcff90 max_arch_pfn = 0x400000000
    Mar 12 17:31:37 silverstone kernel: found SMP MP-table at [mem 0x000ff780-0x000ff78f] mapped at [ffff880
    Mar 12 17:31:37 silverstone kernel: initial memory mapped: [mem 0x00000000-0x1fffffff]
    Mar 12 17:31:37 silverstone kernel: Base memory trampoline at [ffff880000099000] 99000 size 24576
    $ systemctl status systemd-journald
    systemd-journald.service - Journal Service
    Loaded: loaded (/usr/lib/systemd/system/systemd-journald.service; static)
    Active: active (running) since Tue 2013-03-12 18:10:41 PDT; 8min ago
    Docs: man:systemd-journald.service(8)
    man:journald.conf(5)
    Main PID: 142 (systemd-journal)
    Status: "Processing requests..."
    CGroup: name=systemd:/system/systemd-journald.service
    `-142 /usr/lib/systemd/systemd-journald
    However, it looks like the log files keep getting corrupted:
    $ sudo journalctl --verify
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@5e6edd359123491f9998a310206ccbf9-000000000007f543-0004d7c4445effa4.journal
    Invalid object contents at 124687944ââââââââââââââââââââââââââââââââââââââââââ 49%
    File corruption detected at /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000a8cb7-0004d7c3d52e9748.journal:124687944 (of 134074368, 92%).
    FAIL: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000a8cb7-0004d7c3d52e9748.journal (Bad message)
    Invalid object contents at 75715936âââââââââââââââââââââââââââââââââââââââââââ 49%
    File corruption detected at /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system.journal:75715936 (of 76156928, 99%).
    FAIL: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system.journal (Bad message)
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000290d6-0004d7c3a0033472.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@5e6edd359123491f9998a310206ccbf9-0000000000000001-0004d7c413227650.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/[email protected]~
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000fcfc0-0004d7c3fd8ee9c5.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/[email protected]~
    Invalid object contents at 124701856ââââââââââââââââââââââââââââââââââââââââââ 49%
    File corruption detected at /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-0000000000000001-0004d7c3876dda65.journal:124701856 (of 134049792, 93%).
    FAIL: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-0000000000000001-0004d7c3876dda65.journal (Bad message)
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@5e6edd359123491f9998a310206ccbf9-00000000000a9da8-0004d7c45187e39e.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000d26b1-0004d7c3ea1b73f7.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@5e6edd359123491f9998a310206ccbf9-000000000002a43f-0004d7c425785944.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-00000000000539fb-0004d7c3b2d1f935.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@5e6edd359123491f9998a310206ccbf9-0000000000054d23-0004d7c4354da4ef.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/user-1000@2c1af599e637441985385fe37ded2a2c-0000000000001706-0004d7c38cd3de88.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/user-1000@5e6edd359123491f9998a310206ccbf9-00000000000019b4-0004d7c4153f8628.journal
    PASS: /var/log/journal/9ddaa50d8841758bb1bea9b700000f33/system@2c1af599e637441985385fe37ded2a2c-000000000007e345-0004d7c3c3ed8197.journal
    I am using a two or three year old SSD, so maybe it has gotten some bad sectors? But that doesn't explain why journald still bricks things when it isn't logging anything. The install is 10 months old, and I switched from init to systemd around October. Is there anything I can do, short of reinstalling?
    Thanks,
    Nicholas
    Last edited by bicyclingrevolution (2013-03-14 05:57:13)

    Thanks for the tip ilkyest, but it didn't make any difference to the systemd-journald problem.
    However, I looked at journalctl again and found it cluttered with CUPS failures:
    -- Logs begin at Tue 2013-03-12 19:17:00 PDT, end at Wed 2013-03-13 22:31:31 PDT. --
    Mar 12 19:17:00 silverstone spideroak_inotify[796]: Program started
    Mar 12 19:21:30 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:30 silverstone systemd-journal[143]: Suppressed 7199 messages from /system
    Mar 12 19:21:27 silverstone systemd[1]: Starting CUPS Printing Service...
    Mar 12 19:21:30 silverstone systemd-journal[143]: Suppressed 5471 messages from /system
    Mar 12 19:21:27 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:30 silverstone systemd-journal[143]: Suppressed 5699 messages from /system
    Mar 12 19:21:27 silverstone systemd[1]: Failed to start CUPS Printing Service.
    Mar 12 19:21:27 silverstone systemd[1]: Starting CUPS Printing Service...
    Mar 12 19:21:27 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:27 silverstone systemd[1]: Failed to start CUPS Printing Service.
    Mar 12 19:21:27 silverstone systemd[1]: Starting CUPS Printing Service...
    Mar 12 19:21:27 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:27 silverstone systemd[1]: Failed to start CUPS Printing Service.
    Mar 12 19:21:27 silverstone systemd[1]: Starting CUPS Printing Service...
    Mar 12 19:21:27 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:30 silverstone systemd-coredump[1592]: Process 1590 (cupsd) dumped core.
    Mar 12 19:21:28 silverstone colord[354]: Profile added: Deskjet_3840-Gray..
    Mar 12 19:21:28 silverstone colord[354]: Profile added: Deskjet_3840-RGB..
    Mar 12 19:21:28 silverstone colord[354]: Device added: cups-Deskjet_3840
    Mar 12 19:21:28 silverstone colord[354]: Profile added: Deskjet_F4100-Gray..
    Mar 12 19:21:28 silverstone colord[354]: Profile added: Deskjet_F4100-RGB..
    Mar 12 19:21:28 silverstone colord[354]: Device added: cups-Deskjet_F4100
    Mar 12 19:21:28 silverstone dbus[337]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
    Mar 12 19:21:28 silverstone dbus[337]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs
    Mar 12 19:21:28 silverstone colord[354]: Profile removed: Deskjet_3840-Gray..
    Mar 12 19:21:28 silverstone colord[354]: Profile removed: Deskjet_3840-RGB..
    Mar 12 19:21:28 silverstone colord[354]: device removed: cups-Deskjet_3840
    Mar 12 19:21:31 silverstone colord[354]: Profile removed: Deskjet_F4100-Gray..
    Mar 12 19:21:31 silverstone colord[354]: Profile removed: Deskjet_F4100-RGB..
    Mar 12 19:21:31 silverstone colord[354]: device removed: cups-Deskjet_F4100
    Mar 12 19:21:31 silverstone dbus-daemon[337]: dbus[337]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
    Mar 12 19:21:31 silverstone dbus-daemon[337]: dbus[337]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or director
    Mar 12 19:21:31 silverstone systemd-journal[143]: Missed 6365 kernel messages
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone cupsd[1590]: Unknown directive DefaultAuthType on line 9.
    Mar 12 19:21:31 silverstone cupsd[1590]: cupsd: client.c:757: avahi_client_get_host_name: Assertion `client' failed.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone cupsd[1594]: Unknown directive DefaultAuthType on line 9.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Mar 12 19:21:31 silverstone systemd[1]: cups.service start request repeated too quickly, refusing to start.
    Disabling cups solved the CPU usage issue.
    It looks like the root of the problem is Avahi failing to start, but I have no idea why it isn't working.
    $ systemctl status dbus-org.freedesktop.Avahi.service
    dbus-org.freedesktop.Avahi.service
    Loaded: error (Reason: No such file or directory)
    Active: inactive (dead)

  • [SOLVED] Arch very slow at boot, high HDD usage

    Hi,
    After an upgrade today (I don't know exactly what packages I upgraded, but it had been around 2 days between when I did it last), my Arch install has been very slow booting up. There is VERY high hard disk usage while booting, and I get the following messages that I never used to get before:
    1 - stalling at running cleanup hook
    2 - A start job is running dev-sda2.device (/home)
    When it has fully booted up into KDM, any keyboard press and the HDD is paging again and things slow to a crawl. I tried logging in, but 10 minutes in and things were still loading.
    I suspect that I might have lost my journal or suffered extreme file system corruption, but I have done nothing of the sort, after the upgrade Arch had a clean shutdown with no out of place messages.
    Right now I'm at school, so I won't be able do more debugging, but once I get home, I'll try and do fsck from the live USB.
    Thanks!
    EDIT: I looked at the systemd wiki, and added noauto,x-systemd.automount to fstab and now instead of saying "A start job is running..." it's now showing: "...recreate volatile files and directories..."; it came and went so fast I didn't have time to read the entire line.
    Last edited by ctown.myth (2013-03-20 00:16:20)

    So, after coming back home, I booted up the live USB and did fsck -fpv on both root and /home. After that I was at a loss so I restarted, and everything seems to be working now.
    I will mark this thread solved, however if someone knew exactly why this happened and what to do in the future to prevent it, it would be eternally helpful!
    Anyways thanks Arch Forums for nothing /s !
    Last edited by ctown.myth (2013-03-20 00:16:05)

  • [udevd] _very_ high cpu usage.. (solved)

    Hi there.
    Since I'm under Arch Linux (near 1 year), I always had a problem with udevd and my cpu usage. Before I thought it was a kernel issue, so I did all the updates I can, but no changes..
    Sometimes, when I idle, my cpu fan make some noises, so I watch htop, and I see udevd at 99% of my cpu usage... It's very annoying, no ?
    I never can solve it, since 1 year.. So I turn to you..
    Thanks in advance if anyone can help me
    Last edited by Cr0k (2010-06-19 07:09:04)

    If you couldn't solve it for one year, you clearly had enough time to use the search function:
    http://bbs.archlinux.org/viewtopic.php?id=94315
    http://bbs.archlinux.org/viewtopic.php?id=86310
    http://bbs.archlinux.org/viewtopic.php?id=82328
    http://bbs.archlinux.org/viewtopic.php?id=78946
    Bug report
    In essence: If you have an optical drive from NEC/Optiarc, do a firmware upgrade.
    Last edited by Runiq (2010-06-18 06:32:14)

Maybe you are looking for