+#if KERNEL_LINUX
+ long long int *llvalues = NULL;
+ char file_contents[1024 * 10];
+ char *fields[3];
+ int numfields;
+ ssize_t len;
+
+ ksp = llist_create ();
+ if (ksp == NULL)
+ {
+ ERROR ("zfs_arc plugin: `llist_create' failed.");
+ return (-1);
+ }
+
+ len = read_file_contents (ZOL_ARCSTATS_FILE, file_contents, sizeof(file_contents));
+ if (len > 1)
+ {
+
+ int i=0;
+ char *pnl = file_contents;
+ char *pnnl;
+
+ file_contents[len] = '\0';
+
+ while (pnl != NULL)
+ {
+ pnl = strchr(pnl, '\n');
+ i++;
+ if (pnl && (*pnl != '\0'))
+ pnl++;
+ }
+
+ if (i > 0)
+ {
+ llentry_t *e;
+ llvalues = malloc(sizeof(long long int) * i);
+ int j = 0;
+
+ pnl = file_contents;
+ while (pnl != NULL)
+ {
+ pnnl = strchr(pnl, '\n');
+ if (pnnl != NULL)
+ *pnnl = '\0';
+
+ numfields = strsplit (pnl, fields, 4);
+ if (numfields == 3)
+ {
+ llvalues[j] = atoll (fields[2]);
+
+ e = llentry_create (fields[0], &llvalues[j]);
+ if (e == NULL)
+ {
+ ERROR ("zfs_arc plugin: `llentry_create' failed.");
+ }
+ else
+ {
+ llist_append (ksp, e);
+ }
+ j++;
+ }
+ pnl = pnnl;
+ if (pnl != NULL)
+ pnl ++;
+ }
+ }
+ }
+
+#elif !defined(__FreeBSD__) // Solaris