static long[] getMemoryUsage(VespaService service) {
        BufferedReader br;
        int pid = service.getPid();

        try {
            br = new BufferedReader(new FileReader("/proc/" + pid + "/smaps"));
        } catch (FileNotFoundException ex) {
            service.setAlive(false);
            return new long[2];
        }
        try {
            return getMemoryUsage(br);
        } catch (IOException ex) {
            log.log(Level.FINE, "Unable to read line from smaps file", ex);
            return new long[2];
        } finally {
            try {
                br.close();
            } catch (IOException ex) {
                log.log(Level.FINE, "Closing of smaps file failed", ex);
            }
        }
    }
@Test
    public void testSmapsParsing() throws IOException {
        BufferedReader br = new BufferedReader(new StringReader(smaps));
        long[] memusage = SystemPoller.getMemoryUsage(br);
        assertEquals(913408L, memusage[0]);
        assertEquals(847872L, memusage[1]);
    }