The most accurate way to measure your state of ketosis is with a blood test, which is a bit pricey. Urinalysis of ketone bodies is generally most accurate as you are initially transitioning into ketosis, because after about a month or so of eating a ketogenic diet your body often becomes “keto-adapted” and usually will not excrete as many “excess” ketone bodies, which are what is measured in urine. I have worked with many folks on a strict ketogenic diet who never get above a “trace” level of ketosis when measuring their urine because they have metabolically become adapted to ketosis.
Another way to measure your level of ketosis is with a breath tests. Some people find this, or the blood test, to be a much more accurate way of measuring ketosis. But even without tools to measure, if you are eating very low carbohydrate (20-50 g/day) you are probably in ketosis.