3

Note: I opened this question on Stackoverflow first and realized that this is the right place for the question. Just stating that it is not a duplicate, already closed the question on SO.

I am new to sar(also new to serverfault) I am getting the following error when trying to open system activity files locally(using Ubuntu 12.04) that were imported from a server.

I placed the files under /home/someuser/logs and run the command sar -f sa08. The error I am getting is Invalid system activity file: sa08 Is there anything that I am not doing right?

Also, is there any other way to open the files without using sar?

Thank you

user624558
  • 135
  • 1
  • 4

1 Answers1

2

As per source code you will got this message when there is a differnce in version of sysstat package.Please make sure both server uses same sysstat package

sa_common.c

void handle_invalid_sa_file(int *fd, struct file_magic *file_magic, char *file,
                            int n)
{
    fprintf(stderr, _("Invalid system activity file: %s\n"), file);

    if ((n == FILE_MAGIC_SIZE) && (file_magic->sysstat_magic == SYSSTAT_MAGIC)) {
            /* This is a sysstat file, but this file has an old format */
            display_sa_file_version(stderr, file_magic);

            fprintf(stderr,
                    _("Current sysstat version can no longer read the format of this file (%#x)\n"),
                    file_magic->format_magic);
    }

    close (*fd);
    exit(3);
}
Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Prashant Lakhera
  • 683
  • 1
  • 9
  • 25
  • Thank you, After realizing that the server was using a different version than the one I have locally, I removed the current version, installed the version that the server was using and worked with no issues(mine was 10.0.3 and server is using 7.0.2). If anyone goes to the same issue, I found the older version at [sysstat utility home page](http://sebastien.godard.pagesperso-orange.fr/download.html) – user624558 Mar 06 '14 at 15:50